This install guide was written for Mac OS X, and Homebrew is required.
If you do not have Homebrew installed, you will find instructions here.
If you do have Homebrew installed, you will want to update it, just in case:
$ brew update
import os, glob, shutil, sys | |
path = os.environ['LOCALAPPDATA'] + "/Google/Chrome/User Data/Default/Cache/" | |
listing = os.listdir(path) | |
for infile in listing: | |
if "f_" in infile: | |
abs_path = path + infile | |
statinfo = os.stat(abs_path) | |
if statinfo.st_size > 1000000: #checking to see if the file > 1MB |
// Given an array ["foo", "bar", "baz"], | |
// return ["foo foo foo", "bar bar bar", "baz baz baz"] | |
var arr = ["foo", "bar", "baz"]; | |
function triple(element) { | |
return [element, element, element].join(" "); | |
} | |
arr.forEach(function() { |
// Given an array, var arr = [1,2,3,4,5] how do you implement a function duplicator such that | |
// arr.duplicator() == [1,2,3,4,5,1,2,3,4,5]? | |
Array.prototype.duplicator = function() { | |
return this.concat(this); | |
}; | |
var arr = [1,2,3,4,5], | |
dupe = arr.duplicator(); |
// Given an array, var arr = [1,2,3,4,5] how do you implement a function duplicator such that | |
// arr.duplicator() == [1,2,3,4,5,1,2,3,4,5]? | |
// Duplicate array elements by modifying array instead of assigning the returned array to a new var. | |
Array.prototype.duplicator = function(obj) { | |
this.map(duplicate); | |
}; | |
function duplicate(element, index, array){ | |
return array.push(element); |
//jQuery.ajax - Success, error and complete are deprecated in jQuery 1.8 | |
function toListItem(element) { | |
return '<li>' + element + '</li>'; | |
} | |
var first = $.ajax({ | |
type: "GET", | |
url: "/items", | |
accepts: "text/json" | |
}); |
ttfm = { | |
awesome: null, | |
lame: null, | |
setButtons: function() { | |
var awesome, lame; | |
$('div.roomView > div > a').each(function() { | |
if ($(this).css('top') === '555px') { | |
if ($(this).css('left') === '370px') { | |
this.awesome = $(this); | |
} else { |
#!/bin/bash | |
# Original by Gary Bernhardt: | |
# | |
# https://raw.github.com/garybernhardt/dotfiles/master/.githelpers | |
# | |
# Log output: | |
# | |
# 51c333e 2012-07-12 Gary Bernhardt add vim-eunuch | |
# |
This install guide was written for Mac OS X, and Homebrew is required.
If you do not have Homebrew installed, you will find instructions here.
If you do have Homebrew installed, you will want to update it, just in case:
$ brew update
Note: This guide was written for Phoenix 1.1.4. Parts of it may no longer work if you are using a newer version.
Let’s build a JSON API that serves a list of contacts. We’ll be writing it using Elixir (version 1.2.5) and Phoenix (version 1.1.4). Phoenix is a framework written in Elixir that aims to make writing fast, low latency web applications as enjoyable as possible.
Source Code: The source code after finishing this guide can be found here.
Started out by following the instructions here for installing ejabberd on my Mac.
Configure and make:
## Enable flags ensure modules are included to support Riak and Redis
./configure --enable-riak --enable-redis --prefix=$HOME/my-ejabberd
./rebar get-deps
./rebar compile