Skip to content

Instantly share code, notes, and snippets.

View nicotaing's full-sized avatar
🥐

Nico Taing nicotaing

🥐
View GitHub Profile
@ryanb
ryanb / github_tree_slider.js
Created December 6, 2010 17:23
This is how GitHub's new AJAX file browser works.
GitHub.TreeSlider = function () {
if (window.history && window.history.pushState) {
function a() {
if (e.sliding) {
e.sliding = false;
$(".frame-right").hide();
$(".frame-loading:visible").removeClass("frame-loading")
}
}
if (!($("#slider").length == 0 || !GitHub.shouldSlide)) if (!navigator.userAgent.match(/(iPod|iPhone|iPad)/)) {
@nicotaing
nicotaing / Passenger.txt
Created September 23, 2011 23:05
Lion Server Setup
Install Passenger in Lion
http://electronicholas.com/2011/08/passenger-prefpane-1-5-for-mac-os-x-lion-10-7/passenger-prefpane/
Enable web server in "Server App"
gem install passenger
rvmsudo passenger-install-apache2-module
copy commands from output to /etc/apache2/other/passenger.conf
Here's an example with ree@integrity gemset
@nesquena
nesquena / markdown_yard.md
Created November 29, 2011 21:51
Github Flavored Markdown in YARD
@mattyoho
mattyoho / 0-readme.md
Created March 19, 2012 13:26 — forked from burke/0-readme.md
ruby-1.9.3-p125 cumulative performance patch.

Patched ruby 1.9.3-p125 for 30% faster rails boot

What is?

This script installs a patched version of ruby 1.9.3-p125 with patches to make ruby-debug work again (#47) and boot-time performance improvements (#66 and #68), and runtime performance improvements (#83 and #84). It also includes the new backported GC from ruby-trunk.

Huge thanks to funny-falcon for the performance patches.

@floehopper
floehopper / mocha-minitest-integration-options.md
Created July 18, 2012 15:54
Mocha/MiniTest integration options

Mocha/MiniTest integration

I think that the approach @tenderlove has suggested to avoid monkey-patching MiniTest (and the way MiniTest works) means that to use Mocha with MiniTest, you would either need to include the Mocha integration module into every test case, or define your own test case class inheriting from MiniTest::Unit::TestCase.

This works well for Rails (i.e. ActiveSupport), because it already defines a new test case class (ActiveSupport::TestCase) which is a suitable place to include the Mocha integration module.

If we were to go down this route, in non-Rails Ruby projects you'd need to do one of the following...

Option A

@josephwecker
josephwecker / new_bashrc.sh
Created August 11, 2012 04:36
Replace .bashrc, .bash_profile, .profile, etc. with something much more clean, consistent, and meaningful. Now a repo: https://github.com/josephwecker/bashrc_dispatch
#!/bin/bash
# License: Public Domain.
# Author: Joseph Wecker, 2012
#
# -- DEPRICATED --
# This gist is slow and is missing .bashrc_once
# Use the one in the repo instead! https://github.com/josephwecker/bashrc_dispatch
# (Thanks gioele)
#
# Are you tired of trying to remember what .bashrc does vs .bash_profile vs .profile?
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@freeformz
freeformz / WhyILikeGo.md
Last active October 6, 2022 23:31
Why I Like Go

A slightly updated version of this doc is here on my website.

Why I Like Go

I visited with PagerDuty yesterday for a little Friday beer and pizza. While there I got started talking about Go. I was asked by Alex, their CEO, why I liked it. Several other people have asked me the same question recently, so I figured it was worth posting.

Goroutines

The first 1/2 of Go's concurrency story. Lightweight, concurrent function execution. You can spawn tons of these if needed and the Go runtime multiplexes them onto the configured number of CPUs/Threads as needed. They start with a super small stack that can grow (and shrink) via dynamic allocation (and freeing). They are as simple as go f(x), where f() is a function.

@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active July 7, 2024 19:32
A badass list of frontend development resources I collected over time.
@ragingwind
ragingwind / Backend Architectures Keywords and References.md
Last active July 4, 2024 13:00
Backend Architectures Keywords and References