Skip to content

Instantly share code, notes, and snippets.

@afaur
afaur / Talk Notes.txt
Last active November 23, 2018 14:28
Interactive Walkthrough Notes - Iterm2, Tmux, Zsh, Vim, Dotties, Visual Studio Code, and Other CLI Tools
Visual Studio Code
- Terminal Integration
- Big benefit as your able to create multiple sessions and supports color.
- Plugins
Visual Studio Code Settings Sync
- Sync Settings, Snippets, launch, keybindings files and extensions Across Multiple Machines using Github GIST.
File Peek
@joepie91
joepie91 / promises-faq.md
Last active June 25, 2023 09:02
The Promises FAQ - addressing the most common questions and misconceptions about Promises.
@zunda
zunda / gist:2240e996a35bb5feaa07
Last active August 6, 2019 13:53
Yosemiteでgem install --user-install rabbitするにはPKG_CONFIG_PATH=/usr/local/opt/libffi/lib/pkgconfigを指定する
Fetching: gobject-introspection-3.0.7.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing rabbit:
ERROR: Failed to build gem native extension.
/usr/local/opt/ruby/bin/ruby -r ./siteconf20151121-1191-56d1zb.rb extconf.rb
checking for --enable-debug-build option... no
checking for -Wall option to compiler... yes
checking for -Waggregate-return option to compiler... yes
checking for -Wcast-align option to compiler... yes
@yitznewton
yitznewton / linked_list.js
Created July 8, 2015 18:58
Linked List Kata
// $ brew install node
// $ npm init
// $ npm install -S mocha chai sinon
//
// $ npm test
var sinon = require("sinon");
var expect = require("chai").expect;
var LinkedList = function() {
@staltz
staltz / introrx.md
Last active June 23, 2026 21:33
The introduction to Reactive Programming you've been missing
@brobertsaz
brobertsaz / serversetup.md
Last active January 4, 2016 18:28
Ubuntu Precise Rails, Nginx, Unicorn and Capistrano ('2.15.5') Server Setup

Ubuntu Precise Rails, Nginx, Unicorn and Capistrano ('2.15.5') Server Setup

I originally tried to use the ~> 3.0 version of Capistrano, but fell back to the 2.15.5 version. There were a lot of changes in the new version that I did not feel like learning right at the moment...

1. Setup deploy user

First we will create a new user for deployment:

$ ssh into your server

@maxim
maxim / rails_load_path_tips.md
Last active January 9, 2025 00:59
How to use rails load paths, app, and lib directories.

In Rails 3

NOTE: This post now lives (and kept up to date) on my blog: http://hakunin.com/rails3-load-paths

If you add a dir directly under app/

Do nothing. All files in this dir are eager loaded in production and lazy loaded in development by default.

If you add a dir under app/something/

@shinyay
shinyay / knife configure
Created May 25, 2013 19:30
I show the log which is I configure knife initially. It is simply default setup.
$ bundle exec knife configure
WARNING: No knife configuration file found
Where should I put the config file? [/Users/shinyay/.chef/knife.rb]
Please enter the chef server URL: [http://Shinya-MBA-2011.local:4000]
Please enter an existing username or clientname for the API: [shinyay]
Please enter the validation clientname: [chef-validator]
Please enter the location of the validation key: [/etc/chef/validation.pem]
Please enter the path to a chef repository (or leave blank):
*****
@anildigital
anildigital / user_system_real.md
Created September 20, 2011 18:30
Ruby Benchmark module: meanings of “user”, “system”, and “real”?

Ruby Benchmark module: meanings of “user”, “system”, and “real”?

>> Benchmark.bm(7) { |b| b.report('Report:') { s = '' ; 10000.times { s += 'a' } }  }
			 user     system      total        real
Report:  0.150000   0.010000   0.160000 (  0.156361)

These are the same times that the Unix time command or other typical benchmarking tools would report:

user: the amount of time spent executing userspace code (i.e.: your code),

@zhengjia
zhengjia / capybara cheat sheet
Created June 7, 2010 01:35
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')