I hereby claim:
- I am adamalbrecht on github.
- I am adamalbrecht (https://keybase.io/adamalbrecht) on keybase.
- I have a public key ASAH-RXPL5zjhav1D1o_rh7KU0QLq0wXhXisIDk1C6W9QQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
let blacklists = [ | |
"*://mail.google.com/*", | |
"*://inbox.google.com/*", | |
"*://twitter.com/*" | |
] | |
map "ctrl+l" nextTab | |
map "ctrl+h" previousTab | |
set preventdefaultesc |
I hereby claim:
To claim this, I am signing this object:
class BaseAPI | |
constructor: (@route, @options={}) -> | |
# Some extra logic based on @options. Mine involves setting up optional parent routes for nested resources. | |
getList: (params={}) -> | |
# GET request using @route and the params. Returns a promise. | |
get: (id, params={}) -> | |
# GET request using @route, id and params. Returns a promise. |
#!/usr/bin/env bash | |
sudo apt-get -y update | |
sudo apt-get -y install build-essential libyaml-dev zlib1g-dev openssl libssl-dev libreadline6-dev | |
cd /tmp | |
wget ftp://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p0.tar.gz | |
tar -xvzf ruby-2.0.0-p0.tar.gz | |
cd ruby-2.0.0-p0 | |
sudo ./configure --prefix=/usr/local | |
sudo make | |
sudo make install |
// Returns a function, that, as long as it continues to be invoked, will not | |
// be triggered. The function will be called after it stops being called for | |
// N milliseconds. If `immediate` is passed, trigger the function on the | |
// leading edge, instead of the trailing. | |
angular.module('ngDebounce', []).factory('$debounce', function($timeout, $q) { | |
return function(func, wait, immediate) { | |
var timeout; | |
var deferred = $q.defer(); | |
return function() { | |
var context = this, args = arguments; |
$(document).ready(function(){ | |
// .loading is a div at the bottom of the screen. Only display if there are additional records able to be loaded | |
if ($('.loading').length > 0) { | |
$(window).scroll(function() { | |
if ($(window).scrollTop() > $(document).height() - $(window).height() - 50) { | |
$('.loading').text("Loading more products") | |
// Fetch more records by pulling either JSON or straight HTML from the server | |
// Set the html for these records to a variable called additionalRecordsHtml | |
$('.results').append(additionalRecordsHtml) | |
} |
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |