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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<title>Notepad</title> |
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
/* | |
A simple Node.js proxy for Twitter's OAuth API. | |
*/ | |
var http = require('http'); | |
var url = require('url'); | |
var t = require('twitter-js-client'); | |
var twitter = new t.Twitter({ | |
"consumerKey": "###", |
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 http = require('http'), | |
url = require('url'), | |
exec = require('child_process').exec; | |
var locked = false; | |
var app = http.createServer(function(request, response) { | |
var url_parts = url.parse(request.url, true); | |
var path = url_parts.pathname.replace(/^\/|\/$/g, ''); |
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
/* Convert YouTube to MP3 */ | |
javascript:window.open('http://www.video2mp3.net/loading.php?url='+window.location) | |
/* Include jQuery */ | |
javascript:(function(a){if(!a.jQuery){var d=document,b=d.createElement('script');b.src='//code.jquery.com/jquery-latest.js';d.getElementsByTagName('head')[0].appendChild(b)}})(this) | |
/* View Source */ |
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
function github_req(user, cb) { | |
makeRequest( | |
'https://api.github.com/users/' + user + '/events', | |
function (text) { | |
var data = JSON.parse(text); | |
cb(data); | |
} | |
); | |
} |
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 | |
# Trigger my NFC unlock to lock the computer | |
curl http://localhost:6001/?secret=secret | |
# Send standby signal | |
dbus-send --system --print-reply --dest="org.freedesktop.UPower" /org/freedesktop/UPower org.freedesktop.UPower.Suspend |
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 | |
def _has_colors(stream): | |
if not hasattr(stream, 'isatty'): | |
return False | |
if not stream.isatty(): | |
return False | |
try: | |
import curses |
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 os | |
import sys | |
import colors | |
class Node(): | |
_OPT = { | |
'depth': False, | |
'colors': True, | |
'abspath': 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
import sys | |
def getTerminalSize(): | |
import os | |
env = os.environ | |
def ioctl_GWINSZ(fd): | |
try: | |
import fcntl, termios, struct, os | |
cr = struct.unpack('hh', fcntl.ioctl(fd, termios.TIOCGWINSZ, '1234')) |
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 | |
ssh_url="[email protected]" | |
base_path="/home/git/deploy" | |
repo_dir="$base_path/repos" | |
processing="$base_path/processing" | |
getter="$base_path/github-getter" | |
post_receive="$base_path/post-receive" | |
full_name="itsapi/github-getter" |
OlderNewer