Skip to content

Instantly share code, notes, and snippets.

@thermistor
thermistor / assets.rake
Created October 20, 2011 13:55 — forked from shedd/assets.rake
Check asset encoding for valid UTF-8
namespace :assets do
desc "Check that all assets have valid encoding"
task :check => :environment do
paths = ["app/assets", "lib/assets", "vendor/assets"]
extensions = ["js", "coffee", "css", "scss"]
paths.each do |path|
dir_path = Rails.root + path
@nilcolor
nilcolor / 0_README.md
Last active December 11, 2015 12:48
ruby-1.9.3-p374 cumulative performance patch for rbenv

ruby-1.9.3-p374 cumulative performance patch for rbenv

This installs a patched ruby 1.9.3-p374 with the railsexpress patchsets: https://github.com/skaes/rvm-patchsets

Requirements

You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.

@valyagolev
valyagolev / Instructions.markdown
Created August 18, 2011 19:33
Virtualenv in new Terminal windows/tabs

Run these commands in your console, they will edit necessary files:

echo 'basename "$VIRTUAL_ENV" > ~/.last_venv' >> $VIRTUALENVWRAPPER_HOOK_DIR/postactivate
echo 'rm ~/.last_venv' >> $VIRTUALENVWRAPPER_HOOK_DIR/postdeactivate

Then open your ~/.bashrc or ~/.profile or whatever your shell uses and append:

if [ -e ~/.last_venv ]; then
    workon `cat ~/.last_venv`

fi

@brianstorti
brianstorti / priority_queue.rb
Last active November 17, 2022 16:14
Priority queue implementation in Ruby
class PriorityQueue
attr_reader :elements
def initialize
@elements = [nil]
end
def <<(element)
@elements << element
bubble_up(@elements.size - 1)
@wsargent
wsargent / docker_cheat.md
Last active August 31, 2023 12:10
Docker cheat sheet
@jasonrudolph
jasonrudolph / about.md
Last active January 6, 2024 07:40
Programming Achievements: How to Level Up as a Developer
@DAddYE
DAddYE / hack.sh
Created March 19, 2012 11:31
OSX For Hackers
#!/bin/sh
##
# This is a script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# Run in interactive mode with:
# $ sh -c "$(curl -sL https://raw.github.com/gist/2108403/hack.sh)"
#
# or run it without prompt questions:
@pjobson
pjobson / remove_mcafee.md
Last active March 26, 2024 04:26
OSX McAfee Removal

Removal of McAfee from OSX

Note: This was written in 2015, it may be out of date now.

There are a lot of commands here which I use sudo if you don't know what you're doing with sudo, especially where I rm you can severely screw up your system.

There are many reasons which you would want to remove a piece of software such as McAfee, such as not wanting it to hammer your CPU during work hours which seems like primetime for a virus scan.

I intend this to be a living document, I have included suggestions from peoples' replies.

@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/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
#