Skip to content

Instantly share code, notes, and snippets.

@jaywilliams
jaywilliams / Twilight Terminal Theme.mdown
Created August 1, 2012 16:41
Twilight Theme Terminal Colors

Twilight Theme Terminal Colors

Based on the timeless TextMate theme.

Basic Colors

Foreground:     #FEFFD3

Background: #141414

@fkowal
fkowal / .gitignore
Created August 24, 2012 08:13
NodeJs tail with websocket
.idea
node_modules
atlassian-ide-plugin.xml
@mildmojo
mildmojo / left_join_arel_example.rb
Last active April 5, 2024 16:00
LEFT JOIN in ARel for ActiveRecord in Ruby on Rails
# Here's a contrived example of a LEFT JOIN using ARel. This is an example of
# the mechanics, not a real-world use case.
# NOTE: In the gist comments, @ozydingo linked their general-purpose ActiveRecord
# extension that works for any named association. That's what I really wanted!
# Go use that! Go: https://gist.github.com/ozydingo/70de96ad57ab69003446
# == DEFINITIONS
# - A Taxi is a car for hire. A taxi has_many :passengers.
# - A Passenger records one person riding in one taxi one time. It belongs_to :taxi.
@1wErt3r
1wErt3r / SMBDIS.ASM
Created November 9, 2012 22:27
A Comprehensive Super Mario Bros. Disassembly
;SMBDIS.ASM - A COMPREHENSIVE SUPER MARIO BROS. DISASSEMBLY
;by doppelganger ([email protected])
;This file is provided for your own use as-is. It will require the character rom data
;and an iNES file header to get it to work.
;There are so many people I have to thank for this, that taking all the credit for
;myself would be an unforgivable act of arrogance. Without their help this would
;probably not be possible. So I thank all the peeps in the nesdev scene whose insight into
;the 6502 and the NES helped me learn how it works (you guys know who you are, there's no
@gentooboontoo
gentooboontoo / insert-utf8-encoding.rb
Last active December 14, 2015 21:49
Insert missing utf-8 encoding magic comment to existing ruby files. USAGE: ruby insert-utf8-encoding.rb <dir>
#!/usr/bin/env ruby
# encoding: utf-8
Dir[File.join(ARGV[0], '**', '*.{rb,rake}')].each do |file|
lines = File.open(file).readlines
next if lines[0].match(/#\s+(?:en)?coding:\s+utf-8/i)
puts "Adding encoding magic comment to #{file}"
File.open(file, 'w') do |io|

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

@afeld
afeld / gist:5704079
Last active June 6, 2025 21:03
Using Rails+Bower on Heroku
@XVilka
XVilka / TrueColour.md
Last active July 16, 2025 09:53
True Colour (16 million colours) support in various terminal applications and terminals

THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.

PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!

@rctay
rctay / gist:9829266
Created March 28, 2014 10:01
shuffle/randomize playlist/set tracks in Soundcloud Widget eg. https://w.soundcloud.com/player/?url=http://api.soundcloud.com/users/1539950/favorites
require(["lib/play-manager"], function(a) {
// via http://stackoverflow.com/a/6274381
//+ Jonas Raoni Soares Silva
//@ http://jsfromhell.com/array/shuffle [v1.0]
function shuf(o) { for(var j, x, i = o.length; i; j = Math.floor(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x); }
shuf(a.source.models);
var c = a.getCurrentSound(), p = c ? c.isPaused() : false;
a.playNext(); a.playPrev(); // poor man's refresh of current playing song
if (p) a.pause(c); // preserve first-run state
@chibicode
chibicode / .vimrc
Created July 27, 2014 10:08
Goodbye Vim, Hello Sublime Text, and My Final .vimrc
" vim:fdm=marker
" Vundle {{{
set nocompatible
filetype off
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle 'airblade/vim-gitgutter'
Bundle 'bling/vim-airline'
Bundle 'chriskempson/base16-vim'