Skip to content

Instantly share code, notes, and snippets.

@james2doyle
james2doyle / atom-nice-font.less
Created February 27, 2014 22:12
nice fonts and scrollbars in the Atom editor!
body {
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
-moz-osx-font-smoothing: grayscale;
}
.tree-view-resizer, .editor {
::-webkit-scrollbar {
width: 0.5em;
height: 0.5em;
@SirRawlins
SirRawlins / url_matcher.rb
Last active August 12, 2022 19:42
RSpec url matcher.
# Drop this into /spec/support/matchers
# Usage: result.should be_url
# Passes if result is a valid url, returns error "expected result to be url" if not.
# Matcher to see if a string is a URL or not.
RSpec::Matchers.define :be_url do |expected|
# The match method, returns true if valie, false if not.
match do |actual|
# Use the URI library to parse the string, returning false if this fails.
URI.parse(actual) rescue false
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active May 5, 2025 13:05
A badass list of frontend development resources I collected over time.
require 'active_support/core_ext/array'
class Garden
attr_reader :layout, :grouped_by_student, :students
def initialize(layout, students = Garden.default_students)
@students = students
@layout = Garden.parse(layout)
@grouped_by_student = group_by_student
define_student_lookups

YARD CHEATSHEET http://yardoc.org

cribbed from http://pastebin.com/xgzeAmBn

Templates to remind you of the options and formatting for the different types of objects you might want to document using YARD.

Running local YARD server

regenerates docs for each request

@jimweirich
jimweirich / ruby_flight2.rb
Created November 7, 2012 21:36
Flying the Parrot AR Drone via Ruby code
# See a video of this at: http://www.youtube.com/watch?v=jlKt2Ed-Y04&feature=youtu.be
require 'ardrone'
drone = ARDrone::Drone.new
drone.start
drone.take_off
sleep 5
drone.turn_right(1.0)
@arnab
arnab / open_last_capybara_page.sh
Created June 27, 2012 06:41
Capybara's launchy integration, without installing the launchy gem
# From inside a Rails root directory
# After you call save_and_open_page in Capybara (and you don't have or want launchy)
open -a "Google Chrome" "tmp/capybara/"`ls -tr tmp/capybara/ | head -2 | tail -1`
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 15, 2025 05:11
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@dskanth
dskanth / app.js
Created May 8, 2012 10:56
Server file for Private chat using node.js and socket.io
var app = require('express').createServer()
var io = require('socket.io').listen(app);
var fs = require('fs');
app.listen(8008);
// routing
app.get('/', function (req, res) {
res.sendfile(__dirname + '/chat.html');
});