Skip to content

Instantly share code, notes, and snippets.

Pretty City - Spinning
Guitar with Fuzz, lots of fuzz
[Verse 1]
Repeat x 4
e|--------------------|-----------------|
B|--------------------|-----------------|
G|-------4b5----------|-----------------|
D|---3-3------5-5-5-5-|-7-7-7-7-7-7-7-7-|
<?php
$URL = 'https://egov.uscis.gov/casestatus/mycasestatus.do?appReceiptNum=LIN';
$lin = 1690882870;
$myfile = fopen("lins.txt", "w");
$i = 0;
while (true) {
$DOM = new DOMDocument;
$yay = $lin - $i;
@voidet
voidet / index.php
Last active February 14, 2020 05:32
MixCloud RSS
<?php
/***********************************
config stuff up here
************************************/
set_time_limit(0);
date_default_timezone_set('America/New_York');
@voidet
voidet / gist:36454f388ded5015d0c3
Created January 12, 2015 10:47
Dijkstra in Objective-C
//
// main.m
// Dijkstra
//
// Created by Richard S on 12/01/2015.
// Copyright (c) 2015 Richard Sbresny. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
@voidet
voidet / gist:c313cee748fbf46f70e0
Created December 7, 2014 08:03
Trie in Swift
// Playground - noun: a place where people can play
import Foundation
extension String {
subscript (i: Int) -> String {
return String(Array(self)[i])
}
func count() -> Int {
@voidet
voidet / Sorting Algorithms
Created December 7, 2014 00:24
Swift Sorting Algorithms
import Foundation
extension Int {
func times(closure:(Int)->Void) {
for i in 0...self {
closure(i)
}
}
@voidet
voidet / strava.rb
Last active December 25, 2015 01:59
GarminConnect 2 Strava
#!/usr/bin/env ruby
require 'net/smtp'
require 'optparse'
require "rubygems"
require "json"
require "net/http"
require "uri"
#######
upstream app {
server unix:/srv/app/current/tmp/sockets/unicorn.sock fail_timeout=0;
}
server {
listen 80;
server_name www.app.com;
rewrite ^/(.*) http://app.com/$1 permanent;
}
server {
@voidet
voidet / Garmin2StravaSyncr.rb
Last active December 14, 2015 01:09
Plug in your Garmin, wait till it mounts. Then run the script. Happy good times.
require 'rest-client'
require 'highline/import'
require 'json'
require 'time'
@activityCount = 0
@uploadedCount = 0
@garminPath = "/Volumes/GARMIN/Garmin/Activities"
def startup()
@voidet
voidet / sync.rb
Created December 13, 2012 11:51
Syncd Just a script I knocked up for a friend. Use case for it was they had a small HDD they wished to sync to a larger data set. They would then delete the files gradually and only sync newer files, or files that they previously had no space to sync with. Basically this is a system that remembers previously deleted files and makes sure they don…
require 'fileutils'
require 'pathname'
require 'digest'
require 'colorize'
class Syncd
def initialize
@dir = '/Volumes/MUSIC'
@remote = '/Users/richard/mew'