Skip to content

Instantly share code, notes, and snippets.

@njonsson
njonsson / The difference between the junior and senior Rails developer
Created May 6, 2009 03:31
The difference between the junior and senior Rails developer — an extract of the discussion forum at the Rubyists LinkedIn group
Someone recently asked the following question in the discussion forum of the Rubyists LinkedIn group: What separates a junior Rails developer from a senior one?
My response follows. Join us at http://www.linkedin.com/groups?gid=120725 to weigh in on this and other topics of interest to Rubyists. As of today there are almost 1,200 members, including numerous movers and shakers in the Ruby and Rails communities.
“Distinguishing between junior and senior people in the Rails world is not so different from making the distinction in other web development environments.
“Junior Rails people have not dealt with scaling issues to the degree that senior people have. Getting a public-facing Rails application to perform under significant stress is more challenging than doing the same with other building materials such as PHP. Senior people know how to performance-test Rails applications, where to look for bottlenecks, and how to eliminate them one after another until performance is acceptable in real conditions. The Ra
@briancicutti
briancicutti / gist:3035155
Created July 2, 2012 19:29
Ruby Warrior Beginner Level 4 Solution
class Player
def play_turn(warrior)
if warrior.feel.enemy?
warrior.attack!
else
if warrior.health < 20 && !taking_damage?(warrior)
warrior.rest!
else
warrior.walk!
end
@olistik
olistik / gist:3894072
Created October 15, 2012 18:09
Ubuntu 12.04 Terminator config: solarized theme + iTerm2-like key bindings
# place this file in ~/.config/terminator/config
[global_config]
title_transmit_bg_color = "#d30102"
focus = system
[keybindings]
reset_clear = <Ctrl>R
new_tab = <Ctrl>T
split_horiz = <Ctrl><Shift>E
split_vert = <Ctrl>E
close_term = <Ctrl><Shift>W
@westonruter
westonruter / gist:5475349
Last active August 12, 2021 07:00 — forked from markjaquith/gist:2653957
WordPress Fragment Caching convenience wrapper
<?php
/*
Usage:
cache_fragment_output( 'unique-key', 3600, function () {
functions_that_do_stuff_live();
these_should_echo();
});
*/
function cache_fragment_output( $key, $ttl, $function ) {
@leemour
leemour / FontFix RubyMine
Last active October 6, 2018 06:42
Fixing font anti-aliasing for Ubuntu.
# Change Java Runtime:
sudo update-alternatives --config java
# Delete Open-JDK
sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\*
# Change fonts - remove hinting:
http://askubuntu.com/questions/32624/ugly-fonts-in-netbeans-how-can-i-make-it-use-the-system-font
# Change RubyMine AntiAliasing first:
@tomfuertes
tomfuertes / config.diff
Created February 9, 2014 17:47
uncss on a rails landing page in < 15 min (initial config steps in comments)
diff --git a/Gruntfile.js b/Gruntfile.js
index 53fe849..80ce14a 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -56,6 +56,16 @@ module.exports = function (grunt) {
max_jshint_notifications: 5
}
},
+ uncss: {
+ gettingStarted: {
@shime
shime / _README.md
Last active March 15, 2021 19:26
comparing dates and times in RSpec

What is this?

How do you compare date/times in RSpec?

If you do this

expect(Time.now.to_i).to eq Time.new(2014, 4, 2).to_i
@zellwk
zellwk / gist:5ddfbde0e83da3d3f9a0
Created August 29, 2014 09:12
Gruntfile for WP
'use strict';
// # Globbing
// for performance reasons we're only matching one level down:
// 'test/spec/{,*/}*.js'
// use this if you want to recursively match all subfolders:
// 'test/spec/**/*.js'
module.exports = function(grunt) {
// load all grunt tasks
require('load-grunt-tasks')(grunt);
@debloper
debloper / repel.js
Last active August 29, 2015 14:07
Lean mouseover-on-page element animator scripts
// Set the element to select; the only moving part here
// Like literally...
var elem = document.querySelector("elem")
, html = document.querySelector("html");
// Apply positioning, just in case it wasn't already
elem.style.position = "absolute";
// Take the viewport height/width into consideration
// @TODO: should be updated on window resize