Skip to content

Instantly share code, notes, and snippets.

View ACollectionOfAtoms's full-sized avatar
💭
:^)

Adam ACollectionOfAtoms

💭
:^)
View GitHub Profile
'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.
*
package main
import (
"bytes"
"encoding/base64"
"fmt"
"io"
"io/ioutil"
"log"
"net/http"
@ACollectionOfAtoms
ACollectionOfAtoms / rot13.go
Created October 8, 2017 18:57
A Tour of Go - Exercise: rot13Reader Solution
package main
import (
"io"
"os"
"strings"
)
type rot13Reader struct {
r io.Reader
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/'),
import sys
import threading
import psutil
import os
from scanner import Scanner
import imgurpython
from PyQt4 import QtGui, QtCore
class Tray(QtGui.QSystemTrayIcon):
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
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
#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