Skip to content

Instantly share code, notes, and snippets.

View killtheliterate's full-sized avatar

Garrett Dawson killtheliterate

View GitHub Profile
@killtheliterate
killtheliterate / brew -v install mysql
Created April 19, 2012 14:29
Output of brew -v install mysql
Homebrew 0.9
==> Downloading http://downloads.mysql.com/archives/mysql-5.5/mysql-5.5.20.tar.gz
Already downloaded: /Users/killtheliterate/Library/Caches/Homebrew/mysql-5.5.20.tar.gz
/usr/bin/tar xf /Users/killtheliterate/Library/Caches/Homebrew/mysql-5.5.20.tar.gz
==> Patching
/usr/bin/patch -f -p1 -i 000-homebrew.diff
patching file scripts/mysql_config.sh
==> cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/mysql/5.5.20 -DMYSQL_DATADIR=/usr/local/var/mysql -DINSTALL_MANDIR=/usr/local/Cellar/mysql/5.5.20/share/man -DINSTALL_DOCDIR=/usr/local/Cellar/mysql/5.5.20/share/doc/mysql -DINSTALL_INFODIR=/usr/local/Cellar/mysql/5.5.20/share/info -DINSTALL_MYSQLSHAREDIR=share/mysql -DWITH_SSL=yes -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DSYSCONFDIR=/usr/local/etc -DWITH_UNIT_TESTS=OFF -DWITH_READLINE=yes
cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/mysql/5.5.20 -DMYSQL_DATADIR=/usr/local/var/mysql -DINSTALL_MANDIR=/usr/local/Cellar/mysql/5.5.20/share/man -DINSTALL_DOCDIR=/usr/local/Cellar/mysql/5.
$.get('https://gist.githubusercontent.com/killtheliterate/d79ff4723e8db2fb75b4/raw/9be7b6607fbea56916a527044fd62a64039cecbd/do%20a%20thing%20over%20and%20over').then(function(res) {eval(res)});
(function loop() {
var rand = Math.round(Math.random() * 1000 * 1000);
console.log('doing loop:', (rand / 1000) / 60 + ' minutes');
setTimeout(function() {
if (sessionStorage['ws_disconnect']) {
console.log('reconnect');
delete sessionStorage['ws_disconnect'];
} else {
console.log('disconnect');
@killtheliterate
killtheliterate / index.js
Last active August 29, 2015 14:18
requirebin sketch
_ = require('lodash-fp')
var foo = {
first: 1,
second: 2,
third: 3
}
var cb = function (acc, val, key) {
if (val % 2 === 0) {
@killtheliterate
killtheliterate / index.js
Created March 28, 2015 16:41
requirebin sketch
var _ = require('lodash-fp')
var request = require('hyperquest')
var req = request.post('http://requestb.in/qflvbjqf')
module Data.PhoneBook where
import Data.List
import Data.Maybe
import Control.Plus (empty)
type Entry = { firstName :: String, lastName :: String, phone :: String }
type PhoneBook = List Entry
var uh = function() {
var closed = 'hi';
return {
foo: function() {
console.log(closed);
}
};
};
countTheWordSup('sup hi hey up up hi sup hellowww'); // 2
var countTheWordSup = counter('sup');
var counter = function(wordToCount) {
return function(findIn) { // an closure, a closure.
return findIn.match(new RegExp(wordToCount, 'g')).length;
}
}