This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define _GNU_SOURCE 1 | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <sys/types.h> | |
#include <dlfcn.h> | |
long PP_Initialize(void) { | |
fp = fopen("/dev/stderr", "a"); | |
fprintf(fp, "DEBUG: entering PP_Initialize.\n"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
try: | |
rng = xrange | |
except NameError: | |
rng = range # Python 3+ | |
def mesq(base, exp, mod, debug=False): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env sh | |
# Execute this file: | |
# - when logging in | |
# - from a cron job whet the day of time changes (see below) | |
# An improved version could probably get the location from | |
# the internet, and use that to figure out sunrise/sunset times. | |
# Select a random directory. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias g='git status' | |
alias gb='git branch' | |
alias gd='git diff' | |
alias gdm='git diff master' | |
alias gl='git log' | |
alias ga='git add' | |
alias gaa='git add -p .' | |
alias gco='git checkout' | |
alias gc='git commit -v' | |
alias gca='git commit -v -a' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"math/big" | |
"fmt" | |
) | |
type powersOf struct { | |
E int64 | |
b, n *big.Int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Package pixel serves a one pixel image. | |
package pixel | |
import ( | |
"encoding/base64" | |
"net/http" | |
) | |
const px = `iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGP6zwAAAgcBApocMXEAAAAASUVORK5CYII=` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
rtmpdump -v -r "rtmp://37.187.153.186:1935/asmedia/index" -o- \ | |
| cvlc \ | |
--extraintf http \ | |
--http-password changeme \ | |
- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// HTTP JSON API. | |
#include <EtherCard.h> | |
#include <DHT.h> | |
#include <Wire.h> | |
#include <Adafruit_BMP085_U.h> | |
// Ethernet: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
POLYGON((397286.916999997 4795599.52079938,397311.239399999 4795618.50309938,397310.943099998 4795630.07069938,397320.138199999 4795639.56189938,397341.493999998 4795640.45119938,397359.587199995 4795646.08619938,397372.638100001 4795651.42479938,397389.248199998 4795654.39039938,397404.968599999 4795660.02549938,397443.943599998 4795687.60889938,397450.765699999 4795688.79519938,397482.7994 4795688.49759939,397497.630599999 4795717.26819938,397511.868699999 4795751.55569938,397535.301099996 4795767.27529938,397556.3605 4795773.50339938,397569.411400001 4795778.24869938,397583.055700003 4795787.44319938,397599.666199999 4795805.83239938,397613.607199998 4795819.77259938,397630.810399997 4795817.39929938,397665.632100003 4795818.16949939,397679.869599999 4795828.84699938,397695.886399995 4795827.66009938,397711.606899999 4795838.33749938,397760.547799995 4795856.72579938,397791.394699999 4795846.34359939,397801.182600001 4795841.89429938,397851.724599999 4795842.48609938,397880.495999997 4795856.72239938,39789 |