Skip to content

Instantly share code, notes, and snippets.

View ryrych's full-sized avatar

Wojtek Ryrych ryrych

View GitHub Profile
@ddgromit
ddgromit / fisheryates.coffee
Created March 8, 2011 01:56
CoffeeScript Implementation of the Fisher-Yates array sorting algorithm
# Adapted from the javascript implementation at http://sedition.com/perl/javascript-fy.html
# Randomizes the order of elements in the passed in array in place.
fisherYates = (arr) ->
i = arr.length;
if i == 0 then return false
while --i
j = Math.floor(Math.random() * (i+1))
tempi = arr[i]
@cholung
cholung / git-cheat-sheet.md
Created November 3, 2015 07:27 — forked from loonies/git-cheat-sheet.md
Git Cheat Sheet

Git Cheat Sheet

Although there are enough resources on the web about Git, I will keep this one for my own reference. Minimal Git version required 1.7.2.

TOC

@maicher
maicher / git
Last active June 14, 2017 13:44
Some useful git commands
# Managing own fork
### Configure upstream
git remote -v
git remote add upstream git@github.com:wimdu/wimdu.git
### Syncing to upstream
git checkout master
git fetch upstream master
git reset --hard upstream/master
@brentertz
brentertz / rvm2rbenv.txt
Created November 21, 2011 23:00
Switch from RVM to RBENV
## Prepare ###################################################################
# Remove RVM
rvm implode
# Ensure your homebrew is working properly and up to date
brew doctor
brew update
## Install ###################################################################
@001101
001101 / font-stacks.css
Created November 10, 2015 03:03 — forked from ct27stf/font-stacks.css
Similar looking fonts for Windows, Linux, Mac
.mono-font-stack {
font-family: Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace;
}
.times-font-stack {
font-family: Cambria, "Hoefler Text", Utopia, "Liberation Serif", "Nimbus Roman No9 L Regular", Times, "Times New Roman", serif;
}
.modern-font-stack {
font-family: Constantia, "Lucida Bright", Lucidabright, "Lucida Serif", Lucida, "DejaVu Serif," "Bitstream Vera Serif", "Liberation Serif", Georgia, serif;
@jaibeee
jaibeee / brew-perms.sh
Last active February 15, 2024 22:49
Configure homebrew permissions to allow multiple users on MAC OSX. Any user from the admin group will be able to manage the homebrew and cask installation on the machine.
#!/bin/sh
# Configure homebrew permissions to allow multiple users on MAC OSX.
# Any user from the admin group will be able to manage the homebrew and cask installation on the machine.
# allow admins to manage homebrew's local install directory
chgrp -R admin /usr/local
chmod -R g+w /usr/local
# allow admins to homebrew's local cache of formulae and source files
chgrp -R admin /Library/Caches/Homebrew
@magnetikonline
magnetikonline / README.md
Last active March 14, 2024 22:48
IE 7/8/9/10/11 Virtual machines from Microsoft - Linux w/VirtualBox installation notes.
# In your test_helper.rb
class ActiveRecord::Base
mattr_accessor :shared_connection
@@shared_connection = nil
def self.connection
@@shared_connection || retrieve_connection
end
end
@LeCoupa
LeCoupa / bash-cheatsheet.sh
Last active May 1, 2024 03:45
Bash CheatSheet for UNIX Systems --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active May 2, 2024 05:55
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application: