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
'use strict'; | |
/** | |
* Throttle a function. To ensure proper context, use `.bind` | |
* | |
* ISSUES: | |
* | |
* Throttle accuracy is off but 'good enough'. | |
* To see this, throttle at 500 and | |
* use setTimeout to call at 499. It will succeed. | |
* |
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 ( | |
"bytes" | |
"encoding/base64" | |
"fmt" | |
"io" | |
"io/ioutil" | |
"log" | |
"net/http" |
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 ( | |
"io" | |
"os" | |
"strings" | |
) | |
type rot13Reader struct { | |
r io.Reader |
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 path = require('path'); | |
var webpack = require('webpack') | |
// var BundleTracker = require('webpack-bundle-tracker'); | |
module.exports = { | |
context: __dirname, | |
entry: ['./app.js'], | |
output: { | |
path: path.resolve('./bundles/'), |
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 | |
import threading | |
import psutil | |
import os | |
from scanner import Scanner | |
import imgurpython | |
from PyQt4 import QtGui, QtCore | |
class Tray(QtGui.QSystemTrayIcon): |
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 RPi.GPIO as GPIO | |
from subprocess import call | |
import subprocess | |
from time import sleep | |
import time | |
import sys | |
import os | |
import urllib2 | |
import thread |
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 cx_Oracle | |
import sys | |
con = cx_Oracle.connect('dadf/dfadf@//sad;lfjkasdf:1521/orcl') | |
cur = con.cursor() | |
class User: | |
def __init__(self,login,password): | |
self.login = login | |
self.password = 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/zsh | |
echo "Supply a number: \c" | |
read num | |
counter=$num | |
ints='^[0-9]+$' | |
#if [[ "$num" = "" ]] || ! [[ "$num" =~ $ints ]];then | |
# echo "Error: You failed to supply a number. Good day!" >&2; exit 1 | |
#elif [[ $num==1 ]] || [[ $num==0 ]];then | |
# echo "The factorial of your number is 1!"; exit 1 |