Skip to content

Instantly share code, notes, and snippets.

View ivanvanderbyl's full-sized avatar
🏝️

Ivan Vanderbyl ivanvanderbyl

🏝️
View GitHub Profile
@ivanvanderbyl
ivanvanderbyl / main.go
Created March 28, 2014 00:05
SSL static file server
package main
import (
"log"
"net/http"
)
func main() {
http.Handle("/versions/", http.StripPrefix("/versions/", http.FileServer(http.Dir("/tmp"))))
log.Printf("About to listen on 10443. Go to https://127.0.0.1:10443/")
@ivanvanderbyl
ivanvanderbyl / gist:10765053
Last active August 29, 2015 13:59 — forked from tomdale/gist:8176366
Life-changing Room for Rent

Life-changing Room for Rent

Man, doesn't the San Francisco real estate market suck? Everything is tiny and expensive, and if you're new to the city, I bet you're feeling really overwhelmed.

But good news! Available for one lucky person is the opportunity to rent a room in a huge (by SF standards) house in Noe Valley with two of the most awesome housemates you could ask for.

Sound awesome? Let's get down to brass tacks:

  • $1500 per month for rent (not including utilities)
  • Available June 23rd.
  • $950 refundable security deposit.
@ivanvanderbyl
ivanvanderbyl / keybase.md
Created June 24, 2014 15:29
Keybase proof

Keybase proof

I hereby claim:

  • I am ivanvanderbyl on github.
  • I am ivanv (https://keybase.io/ivanv) on keybase.
  • I have a public key whose fingerprint is 2172 C1EB 0089 7CC3 ED35 FC72 510B F7F1 CEEC 1666

To claim this, I am signing this object:

@ivanvanderbyl
ivanvanderbyl / create_droplet.sh
Last active August 29, 2015 14:08
Launching Docker 1.3 Droplets on DigitalOcean
#!/bin/bash
# Usage:
# bash ./create_droplet.sh 10 MY_TOKEN
MAX_DROPLETS=$1
TOKEN=$2
create_droplet() {
curl -X POST "https://api.digitalocean.com/v2/droplets" \
@ivanvanderbyl
ivanvanderbyl / styles.css
Created January 2, 2015 17:50
Backlog style sheet
html, body {
padding: 0;
margin: 0;
box-sizing: border-box;
-webkit-box-sizing: border-box;
-webkit-font-smoothing: antialiased;
background-color: #D9D9D9;
color: #2C3E50;
font-family: Roboto, sans-serif;
font-size: 1em;
@ivanvanderbyl
ivanvanderbyl / Brocfile.js
Created February 4, 2015 20:34
Tomster compatible brocfile
/* global require, module */
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
var app = new EmberApp({
fingerprint: {
prepend: process.env.ASSETS_PREPEND
}
});
@ivanvanderbyl
ivanvanderbyl / components-my-counter.js
Created August 4, 2015 03:16
Data Down, Actions Up example
export default Ember.Component.extend({
count: 0,
actions: {
incrementCount: function() {
this.set('count', this.get('count') + 1);
if(this.attrs['on-change']) {
this.attrs['on-change'](this.get('count'));
}
}
function XHConn()
{
var xmlhttp, bComplete = false;
try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); }
catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); }
catch (e) { try { xmlhttp = new XMLHttpRequest(); }
catch (e) { xmlhttp = false; }}}
if (!xmlhttp) return null;
this.connect = function(sURL, sMethod, sVars, fnDone)
{
# Daft Golf
# Encode the entire lyrics of Harder Better Faster Stronger in the least amount of characters
# without cheating. Source of lyrics: http://lyricwiki.org/Daft_Punk:Harder,_Better,_Faster,_Stronger
# First attempt without being really anal: 500b
s=%w(after better do ever faster harder hour is it make makes more never our over stronger than us work)
m1="chavnohzy3a7uvnb4iw21ogt3xwazyiw6gqsoaihdjw36q8encnd1oxfpy2eomjfxfr9"
m2="5vjlr1vcd8f7rdjb3c3zfk0kh6cjxc2l8dzvzk2hhfrwkg2n2ln04mpli1tq5gnfu7nvxc6dbk8yq9uxnfboimh5902mqtggizhhaakr2nk2xsh4qar5b8aypdocmeakqelscg11evw57i3ttep2ott0pqteclmae5sckhc"
def d(e, a)
t=e.to_i(36).to_s(2)
t[0]=''
@ivanvanderbyl
ivanvanderbyl / survey
Created November 1, 2009 11:24 — forked from radar/survey.md
What did you do to get good at Rails?
I came from a PHP background, so the path I took was to workout how to do everything I knew with PHP
in Ruby and Rails, as well as reading loads of source code and ripping parts out and making smaller apps.
Who taught you what you know?
Mainly Google, I didn't know anyone using Rails for the first year or more.
Do you have any fond (or not so fond) memories of your learning experiences?