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
machine smtp.gmail.com | |
login [email protected] | |
password my-app-password |
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
#!/bin/bash | |
# compiled from https://docs.docker.com/engine/installation/linux/debian/#/debian-jessie-80-64-bit | |
sudo apt-get update | |
sudo apt-get dist-upgrade -y | |
sudo apt-get install apt-transport-https ca-certificates -y | |
sudo sh -c "echo deb https://apt.dockerproject.org/repo debian-jessie main > /etc/apt/sources.list.d/docker.list" | |
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D |
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 python | |
""" | |
Twitter's API doesn't allow you to get replies to a particular tweet. Strange | |
but true. But you can use Twitter's Search API to search for tweets that are | |
directed at a particular user, and then search through the results to see if | |
any are replies to a given tweet. You probably are also interested in the | |
replies to any replies as well, so the process is recursive. The big caveat | |
here is that the search API only returns results for the last 7 days. So |
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
<html> | |
<head> | |
<style> | |
#canvas { | |
width:100%; | |
} | |
</style> | |
</head> | |
<body> | |
<canvas id="canvas" width="800" height="600" resize /> |
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
/** =========================== SERVER =================================== */ | |
var io = require('socket.io')(server); | |
var MjpegCamera = require('mjpeg-camera'); | |
server.listen(3000); | |
// Create an MjpegCamera instance | |
var camera = new MjpegCamera({ | |
name: 'backdoor', | |
url: 'http://192.168.7.1/video' |
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
# this is the config I always use, to route http://mysite.com/couchdb to localhost:5984. | |
location /couchdb { | |
rewrite /couchdb(.*) $1 break; | |
proxy_pass http://127.0.0.1:5984; | |
proxy_redirect off; | |
proxy_buffering off; | |
proxy_set_header Host $host; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
} |
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
upstream upstream-apache2 { | |
server 127.0.0.1:8080; | |
} | |
upstream upstream-nodejs { | |
server 127.0.0.1:3000; | |
} | |
server { | |
listen 80; |
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
#!/bin/sh | |
# Shell script to update namecheap.com dynamic dns | |
# for a domain to your external IP address | |
HOSTNAME=yoursubdomain | |
DOMAIN=yourdomainname.com | |
PASSWORD=y0urp455w0rd | |
IP=`curl -s echoip.com` |
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
var pubListener = 'tcp://127.0.0.1:5555'; | |
var subListener = 'tcp://127.0.0.1:5556'; | |
var hwm = 1000; | |
var verbose = 0; | |
// The xsub listener is where pubs connect to | |
var subSock = zmq.socket('xsub'); | |
subSock.identity = 'subscriber' + process.pid; | |
subSock.bindSync(subListener); |
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
global <<< require \prelude-ls | |
fizzbuzz = (x) -> | |
| x % 15 is 0 => \fizzbuzz | |
| x % 5 is 0 => \buzz | |
| x % 3 is 0 => \fizz | |
| otherwise => x | |
[1 to 100] |> map fizzbuzz |> each console.log |
NewerOlder