Skip to content

Instantly share code, notes, and snippets.

View film42's full-sized avatar
✔️
Verified

Garrett Thornburg film42

✔️
Verified
View GitHub Profile
@film42
film42 / comcast.log
Created October 15, 2013 06:56
Terrible service from comcast
64 bytes from 74.125.239.104: icmp_seq=13110 ttl=55 time=40.722 ms
64 bytes from 74.125.239.104: icmp_seq=13111 ttl=55 time=39.809 ms
64 bytes from 74.125.239.104: icmp_seq=13112 ttl=55 time=39.896 ms
64 bytes from 74.125.239.104: icmp_seq=13113 ttl=55 time=40.093 ms
64 bytes from 74.125.239.104: icmp_seq=13114 ttl=55 time=37.391 ms
64 bytes from 74.125.239.104: icmp_seq=13115 ttl=55 time=39.613 ms
64 bytes from 74.125.239.104: icmp_seq=13116 ttl=55 time=43.986 ms
64 bytes from 74.125.239.104: icmp_seq=13117 ttl=55 time=39.911 ms
64 bytes from 74.125.239.104: icmp_seq=13118 ttl=55 time=38.396 ms
64 bytes from 74.125.239.104: icmp_seq=13119 ttl=55 time=37.916 ms
@film42
film42 / project-euler-30.clj
Last active December 24, 2015 08:49
Solution to Project Euler problem 30. Just trying to hack something with Clojure.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Project Euler Problem 30 ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Perform n^p
(defn pow [n p]
(reduce * (repeat p n)))
;; Convert a number to a set
(defn number-to-set [n]
@film42
film42 / app.js
Last active December 20, 2015 04:08
var App = Ember.Application.create({
});
App.ThoughtsController = Ember.ArrayController.extend({
init: function () {
var that = this;
setInterval(function() {
that.set("content", App.Thought.find({hack:"hack"}));
;;; ujelly-theme-autoloads.el --- automatically extracted autoloads
;;
;;; Code:
;;;### (autoloads nil "ujelly-theme" "ujelly-theme.el" (21808 38161
;;;;;; 0 0))
;;; Generated autoloads from ujelly-theme.el
class AnyPage
attr_reader :sql
def initialize(sql, options = {})
@page_size = options.fetch(:page_size) { 1000 }
@sql = sql
@total_pages = nil
end
def self.page(sql, nth, options = {})
;;; dracula-theme.el --- Emacs 24 theme with a dark background.
;; Author: film42
;;
;; Version: 0.1
;; Package-Requires: ((emacs "24"))
;; This program is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
require "socket"
# Detect if a socket is in CLOSE_WAIT
def socket_in_close_wait?(socket)
# Will return empty string on EOF (closed socket)
socket.recv_nonblock(1, ::Socket::MSG_PEEK) == ""
rescue IO::WaitReadable
false
end
@film42
film42 / http_get.go
Created October 30, 2012 17:42 — forked from ijt/http_get.go
Example of using http.Get in go (golang)
package main
import (
"fmt"
"http"
"io/ioutil"
"os"
)
func main() {
defmodule Rpc do
defmodule ServiceDirectory do
defmodule Instance do
defstruct address: nil, port: nil, expires_at: nil, uuid: nil
end
##
# USAGE:
#
# Rpc.ServiceDirectory.start_link(port: 53023)
@film42
film42 / output.txt
Created July 31, 2012 03:26
Valgrind verbose install error
film42@mbp /usr/bin % brew install valgrind -v
==> Downloading http://valgrind.org/downloads/valgrind-3.7.0.tar.bz2
Already downloaded: /Library/Caches/Homebrew/valgrind-3.7.0.tar.bz2
/usr/bin/tar xf /Library/Caches/Homebrew/valgrind-3.7.0.tar.bz2
==> ./configure --prefix=/usr/local/Cellar/valgrind/3.7.0 --mandir=/usr/local/Cellar/valgrind/3.7.0/share/man --enable-only64bit --build=amd64-darwin
./configure --prefix=/usr/local/Cellar/valgrind/3.7.0 --mandir=/usr/local/Cellar/valgrind/3.7.0/share/man --enable-only64bit --build=amd64-darwin
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no