Skip to content

Instantly share code, notes, and snippets.

View Gedrovits's full-sized avatar

Vjatseslav Gedrovits Gedrovits

View GitHub Profile
@hfreire
hfreire / qemu_osx_rpi_raspbian_jessie.sh
Last active February 4, 2025 00:47
How to emulate a Raspberry Pi (Raspbian Jessie) on Mac OSX (El Capitan)
# Install QEMU OSX port with ARM support
sudo port install qemu +target_arm
export QEMU=$(which qemu-system-arm)
# Dowload kernel and export location
curl -OL \
https://github.com/dhruvvyas90/qemu-rpi-kernel/blob/master/kernel-qemu-4.1.7-jessie
export RPI_KERNEL=./kernel-qemu-4.1.7-jessie
# Download filesystem and export location
@rjz
rjz / apis.md
Last active March 11, 2025 21:57
APIs: the good, the bad, and the ugly

APIs: the good, the bad, and the ugly

  • Michele Titolo @micheletitolo
  • Who's built, designed, and spec'd a lot of APIs
  • Talk will focus on web APIs, but applies to many programmatic APIs, too

Documentation

  • good: it exists (and bonus points if it's interactive: I/O Docs is one nice example)
@paulirish
paulirish / bling.js
Last active February 18, 2025 14:08
bling dot js
/* bling.js */
window.$ = document.querySelector.bind(document);
window.$$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function(name, fn) { this.addEventListener(name, fn); };
NodeList.prototype.__proto__ = Array.prototype;
NodeList.prototype.on = function(name, fn) { this.forEach((elem) => elem.on(name, fn)); };

Git Cheat Sheet

Commands

Getting Started

git init

or

@jurikern
jurikern / unicorn.rake
Last active August 29, 2015 14:07
Unicorn task for zero downtime deployment
namespace :load do
task :defaults do
set :pids_dir, -> { File.join(current_path, 'tmp', 'pids') }
set :unicorn_pid, -> { File.join(fetch(:pids_dir), "unicorn.pid") }
set :unicorn_config_path, -> { File.join(current_path, "config", "unicorn", "#{fetch(:rails_env)}.rb") }
set :unicorn_roles, -> { :app }
set :unicorn_options, -> { "" }
set :unicorn_rack_env, -> { fetch(:rails_env) == "development" ? "development" : "deployment" }
set :unicorn_restart_sleep_time, 3
end
@fogleman
fogleman / words.md
Last active February 20, 2025 17:00
Mnemonic Encoding Word List

Mnemonic Encoding Word List

http://web.archive.org/web/20090918202746/http://tothink.com/mnemonic/wordlist.html

  • The wordlist contains 1626 words.
  • All words are between 4 and 7 letters long.
  • No word in the list is a prefix of another word (e.g. visit, visitor).
  • Five letter prefixes of words are sufficient to be unique.
  • The words should be usable by people all over the world. The list is far from perfect in that respect. It is heavily biased towards western culture and English in particular. The international vocabulary is simply not big enough. One can argue that even words like "hotel" or "radio" are not truly international. You will find many English words in the list but I have tried to limit them to words that are part of a beginner's vocabulary or words that have close relatives in other european languages. In some cases a word has a different meaning in another language or is pronounced very differently but for the purpose of the encoding it is still ok - I assume that when the encoding is
@ryanzhou
ryanzhou / pf.md
Last active October 21, 2019 03:52
Getting Pow to work in OS X Yosemite

Getting Pow to work in OS X Yosemite

Some parts taken from: https://gist.github.com/kujohn/7209628

ipfw is officially deprecated and removed in OS X Yosemite. Pow requires another program pf to handle the port forwarding.

1. Anchor file

Create file /etc/pf.anchors/pow

@bendyorke
bendyorke / setup.md
Last active March 12, 2021 14:25
Setting up a new mac
@deepakkumarnd
deepakkumarnd / server_setup.sh
Last active October 8, 2024 00:49
Server setup script
# This script has to be run as a root user
echo "* Updating system"
apt-get update
apt-get -y upgrade
echo "* Installing packages"
apt-get -y install build-essential libmagickcore-dev imagemagick libmagickwand-dev libxml2-dev libxslt1-dev git-core nginx redis-server curl nodejs htop
id -u deploy &> /dev/null
if [ $? -ne 0 ]
@octocat
octocat / .gitignore
Created February 27, 2014 19:38
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #