Skip to content

Instantly share code, notes, and snippets.

View CaseyLeask's full-sized avatar

Casey Leask CaseyLeask

  • Melbourne :: Australia
View GitHub Profile
require 'rb-fsevent'
LOG_CMD = 'git log --all --graph --pretty="format:%C(yellow)%h%Cblue%d%Creset %s %C(white) %an, %ar%Creset"'
abort("Run with a single argument (the directory to omglog).") unless ARGV.length == 1
FSEvent.new.tap {|fsevent|
lines = (`tput lines`.to_i * 0.8).floor
fsevent.watch(File.join(ARGV[0], '.git')) {|directories|
`#{LOG_CMD} -#{lines}`.tap {|log|
@pda
pda / spec_helper.rb
Created March 14, 2012 06:23
Fast RSpec with a tiered environment: SPEC=(unit|model|full) rspec …
mode = ENV["SPEC"] || "full"
require_relative "spec_helper_#{mode}"
@stowball
stowball / rwd-resources.md
Last active October 27, 2018 19:33
Articles and resources on responsive design approaches and workflows
(Chapters marked with * are already written. This gets reorganized constantly
and 10 or so written chapters that I'm on the fence about aren't listed.)
Programmer Epistemology
* Dispersed Cost vs. Reduced Cost
* Verificationist Fallacy
* Mistake Metastasis
The Overton Window
Epicycles All The Way Down
The Hyperspace Gates Were Just There
var Authenticated = React.createClass({
statics: {
willTransitionTo (transition) {
if (!authenticated()) {
transition.redirect('login');
}
}
}
});

Things that programmers don't know but should

(A book that I might eventually write!)

Gary Bernhardt

I imagine each of these chapters being about 2,000 words, making the whole book about the size of a small novel. For comparison, articles in large papers like the New York Times average about 1,200 words. Each topic gets whatever level of detail I can fit into that space. For simple topics, that's a lot of space: I can probably walk through a very basic, but working, implementation of the IP protocol.

@ivan-pinatti
ivan-pinatti / jenkins-set-url-and-email.groovy
Last active September 22, 2023 20:20
Jenkins - Set URL and email via groovy script - #jenkins #groovy
#!groovy
// imports
import jenkins.model.Jenkins
import jenkins.model.JenkinsLocationConfiguration
// parameters
def jenkinsParameters = [
email: 'Jenkins Admin <admin@jenkins.com>',
url: 'https://ci.jenkins.com:8083/'
@oliveratgithub
oliveratgithub / autoexec.cfg
Last active September 11, 2021 09:23
ioQuake3 – custom high definition configurations for best visual quality (Quake 3, Quake III Arena). This config file is featured on https://swissmacuser.ch/how-you-want-to-run-quake-iii-arena-in-2018-with-high-definition-graphics-120-fps-on-5k-resolution/
seta r_mode "-1"
seta r_customwidth "5120"
seta r_customheight "2880"
seta cg_fov "115"
seta cg_gunCorrectFOV "1"
seta cl_renderer "opengl2"
seta r_allowSoftwareGL "0"
seta r_ignoreGLErrors "1"
seta r_smp "1"
seta r_displayrefresh "0"