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
;; micah's .emacs file | |
;; package manager stuff | |
(setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/") | |
("marmalade" . "http://marmalade-repo.org/packages/") | |
("melpa" . "http://melpa.milkbox.net/packages/"))) | |
;; hide menu bar | |
(menu-bar-mode -1) | |
;; linum |
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
// | |
// ViewController.h | |
// Hello AppleTV | |
// | |
// Created by Micah Walter on 9/18/15. | |
// | |
#import <UIKit/UIKit.h> | |
@interface ViewController : UIViewController |
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 | |
DATESTRING="$(date -I)" | |
DATADIR="data/" | |
DATAFILE="${DATESTRING}_objects.csv" | |
DUMPFILE="${DATADIR}${DATESTRING}_objects.csv" | |
AWS_ACCESS_KEY="$(cat aws_access_key)" | |
AWS_SECRET_ACCESS_KEY="$(cat aws_secret_access_key)" | |
export PGPASSWORD="$(cat redshift_pass)" |
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
/* | |
Rotary Phone Dial Reader | |
This sketch reads out the number dialed on a rotary phone dial. | |
The rotary dial has two signals: | |
1) turns ON when the wheel is turning | |
2) pulses a count based on the number dialed. | |
The results are printed to the serial monitor. |
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 | |
# Clone or update all a user's gists | |
# curl -ks https://raw.github.com/gist/5466075/gist-backup.py | USER=fedir python | |
# USER=fedir python gist-backup.py | |
import json | |
import urllib | |
from subprocess import call | |
from urllib import urlopen | |
import os |
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 | |
# Check out the code on this server. | |
GIT_WORK_TREE=/home/git/working/<username>/<projectname> git checkout -f | |
# Define an array of servers to which the code will be deployed. | |
SERVERS="abc.example.com, xyz.example.com" | |
# Push codebase to the servers via rsync. | |
for SERVER in $SERVERS |
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
<?php | |
loadlib("http"); | |
################################################################# | |
function rest_call($method, $more=array()){ | |
$defaults = array( | |
'request_method' => 'GET', |
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
;; fix for php-mode | |
(require 'cl) | |
;; package manager stuff | |
(setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/") | |
("marmalade" . "http://marmalade-repo.org/packages/") | |
("melpa" . "http://melpa.milkbox.net/packages/"))) | |
(setq package-enable-at-startup nil) | |
(package-initialize) |
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
DELIMITER $$ | |
CREATE FUNCTION base58_encode (num bigint(64)) RETURNS varchar(255) | |
DETERMINISTIC | |
BEGIN | |
DECLARE alphabet varchar(255); | |
DECLARE base_count int DEFAULT 0; | |
DECLARE encoded varchar(255); | |
DECLARE divisor DECIMAL(10,4); |
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 mongoose = require('mongoose'), | |
Schema = mongoose.Schema; | |
// simple schema for Mongo | |
var MessageSchema = new Schema({ | |
archived: { | |
type: Date, | |
default: Date.now | |
}, | |
message_id: { |