Skip to content
No results
  • Archives
  • Best of GitHub
    • Quine Relay
    • Stacksort
  • Best of YouTube
  • Causal stuff
  • My Stuff
    • My Javascript demos
    • Download geodata
  • Tricks
    • AWS Tricks
    • Beat tricks
    • Datasets
    • Encoding Tricks
    • Geo Tricks
    • Git tricks
    • Linux Tricks
    • Neo4j tricks
    • NumPy & Pandas Tricks
    • PHP tricks
    • Python Tricks
    • Skipper Tips
    • SQL Snippets
SKIPPERKONGEN
  • Archives
  • Best of GitHub
    • Quine Relay
    • Stacksort
  • Best of YouTube
  • Causal stuff
  • My Stuff
    • My Javascript demos
    • Download geodata
  • Tricks
    • AWS Tricks
    • Beat tricks
    • Datasets
    • Encoding Tricks
    • Geo Tricks
    • Git tricks
    • Linux Tricks
    • Neo4j tricks
    • NumPy & Pandas Tricks
    • PHP tricks
    • Python Tricks
    • Skipper Tips
    • SQL Snippets
SKIPPERKONGEN
  • Programming, Systems

Hello world plugin for Nagios in Python

Nagios looks at 1) return codes and 2) output to stdout. This is the hello world of Nagios plugins, written in Python: check_helloworld.py: #!/usr/bin/env python # optparse is Python 2.3 – 2.6, deprecated in 2.7 # For 2.7+ use …

  • kostas
  • December 6, 2011
  • 2 Comments
  • Command line Fu, Fun and trivia

Saving output from ‘text to speech’ to a file on Mac OS X

In terminal you can write something like: say ‘hello world’ Which will make your computer talk. To save the audio output to a file, use the -o option. A full example is: say -o hello.aiff -v ‘Alex’ ‘Hello, my name…

  • kostas
  • December 4, 2011
  • Command line Fu

Kill process from within top in Terminal on Mac OS X

My top seems to act a little strange (running Snow Leopard). It doesn’t respond to the key commands I’m used to, e.g. for sorting on Memory Usage etc. Nevertheless, this is how I found out (by chance really) how to…

  • kostas
  • December 3, 2011
  • Command line Fu, Programming

Installing pip and virtualenv on Mac

These instructions show how to install pip and virtualevn on a Mac running Snow Leopard 10.6.8 and using Python 2.7. I used this to install Django 1.3.1 (installation instructions included). Installing pip (skip if you have pip installed) First make…

  • kostas
  • November 13, 2011
  • 5 Comments
  • Algorithms, Fun and trivia

Finding a route from one wikipedia page to another

Here’s a game I like to play. Select two wikipedia pages at random, and find a route from one to the other. I stated a theorem once that: you can get from any page on wikipedia to the page on…

  • kostas
  • October 27, 2011
  • 2 Comments
  • Command line Fu, Systems

Running Nagios on Amazon EC2

This howto shows how to get Nagios up and running on an Amazon EC2 Instance using Apache web server to serve the Nagios UI. You could argue that a more light-weight web server would be better, but I’d argue that…

  • kostas
  • October 27, 2011
  • 4 Comments
  • Programming, Spatial stuff, Systems

CORS and Google Fusion Tables

Google Fusion Tables is a service for storing tabular data online. It has an API that allows you to make an SQL-like request for data from an online table, like the following: sql=SELECT * FROM 1906375 (clicking the link will…

  • kostas
  • October 20, 2011
  • Programming, Systems

Using CORS instead of JSONP to make cross site requests

Introduction to CORS CORS (Cross Origin Resource Sharing) is a mechanism specifies by W3C (draft), for allowing browsers to make cross origin requests for resources on other domains under certain conditions. It’s related to JSONP because it solves a similar…

  • kostas
  • October 19, 2011
  • Command line Fu

How to put each word in a file on a separate line

Place each word on a separate line with sed and awk: sed -e ‘s/[^[:alpha:]]/ /g’ | awk ‘{ for (i=1;i

  • kostas
  • October 12, 2011
  • Command line Fu

Testing a rhyme hypothesis

I read somewhere that if you take a list of words reverse the letters in each word sort the (reversed) words alphabetically then reverse the words back to normal

  • kostas
  • October 12, 2011
Prev
1 … 18 19 20 21 22 23 24 25
Next
Copyright © 2026 - WordPress Theme by CreativeThemes