This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The JSON | |
[ | |
{ | |
created_at: "2011-10-19T16:22:30Z", | |
id: 1, | |
link: "http://abcnews.go.com/Business/video/job-search-social-media-ditch-resume-hunt-nontraditional-ways-internet-professional-contacts-business-13581468", | |
title: "ABC News: Job Search Through Social Media", | |
updated_at: "2011-10-19T16:22:30Z" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The JSON (get back from api as javascript objects contained in an array) | |
// when logged to console, [▶Object,▶Object] etc. | |
// can be manipulated before being passed to handlebars | |
[ | |
{ | |
id: 1, | |
link: "http://abcnews.go.com/Business/video/job-search-social-media-ditch-resume-hunt-nontraditional-ways-internet-professional-contacts-business-13581468", | |
title: "ABC News: Job Search Through Social Media", | |
updated_at: "2011-10-19T16:22:30Z" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Config Notes | |
# Dependencies: rbenv, ruby 1.9.3-p0, pow, powder, git, git_completion, grc | |
# | |
# path: | |
PS1='\[\e[0;31m\]⚡\[\e[m\] \[\e[0;30m\]${PWD##*/}\[\e[39m\] \[\e[0;33m\]$(__git_ps1 "(%s) ")\[\e[m\]' | |
# pretty colors (brew install grc) | |
source "`brew --prefix grc`/etc/grc.bashrc" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Facebook getLoginStatus Example</title> | |
</head> | |
<body> | |
<p>Check out the console to see if anything appears.</p> | |
<p>HERE'S THE CODE:</p> | |
<pre> | |
$(function(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'nokogiri' | |
require 'open-uri' | |
require 'colored' | |
# this is just a preview of what's to come - a proof of concept. | |
# it will be converted to a api-type library, gemified, and put in it's own repo | |
# for now, a cool way to experiment with amazon's data | |
query = 'ruby' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This script is a great shorcut for managing a large number of files. | |
# It runs through all the files in the present working directory, compares them | |
# against a regex, and then you can do what you want with the matches | |
for f in * | |
do if [[ "$f" =~ some_regex ]] | |
# do something to the files that match | |
# this is just an random example that zips them | |
then zip "$f.zip" $f | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// D3: a data visualization library for javascript --http://mbostock.github.com/d3/ | |
// Allows you to set multiple css properties at once | |
// Add this into the d3 source. Use like this d3.select('p').css({ color: 'red', 'font-size': '24px' }); | |
d3_selectionPrototype.css = function(args) { | |
for (var key in args) { | |
var val = args[key] | |
this.style(key, val) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
str = "iirytroyppytpeppowuiyoiuypipiyuyotyoiwiytorouqyiepyirueuiprpptwyiroqwtuyipourrrourorwipowiorutpwtwruuioquteorioriyutwqyyprptuqqquuituyywyuoewtrppqwrtiiruirpwyptpuoyyoeyerpqiotuieripurouwuwyuwrworowitoepoypeipeypiireeorrwripuuteoitpuutturruwiyryeetyrioweytueqrrrtotrpiqetoyepoipiwrwpppiritupwipruooiepoweypiuwrqywuuwyiroqpqpruioopuiuerputpwwuuiqwpiroewrtwiqerteoyeqtutwoeoipioiuqiiiouuoqtuuwtuwiiqwppqitywuqpuutrqiyoeuuutwrwtoqrqyoeyoiporuuioiwryoeruypreprqroiyuqwtuyoytoerwqryeeripryieypiwqirtriurueypiuyuypriuiwptywppupoioyrewooytreteeriiwroietuwypieeeeeqpiiiwrirtppoeyiwpooyyporpruwuoriiyowuytiwpwpryeywotoyirqypyypoeptiuwwoyprquoetepptorwiewprpiywwtuieeiweytrrwiqtwotioryoiptyyyuriiqiyroeeiqepwteuwptpruuypipieuoiiuuweeuryuuowporrooyywyyrryriqyirooitirueruptotpryoqtipippyptiurwyiryooywtryyuurtrutwqiqiiiqwouyeooueoturuowiuwrtruwwiupwopwweoo" | |
key_map = %w[q w e r t y u i o p] | |
number_map, result = [], [] | |
# map to keyboard character | |
str.split('').each do |letter| | |
key_map.each_with_index do |key,index| | |
numb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for f in *.jpeg; do mv "$f" "`basename "$f" .jpeg`.jpg"; done; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=split($margin: 10px) | |
$left: $margin | |
$right: $margin | |
@if type-of($margin) == list | |
$left: nth($margin, 1) | |
$right: nth($margin, 2) | |
overflow: hidden | |
& > * | |
overflow: hidden |
OlderNewer