Skip to content

Instantly share code, notes, and snippets.

@tijn
tijn / setup_sublime_text_2.rb
Created July 15, 2012 11:43
A simple script to quickly set up Sublime Text 2 to use it in Gnome 3
#!/usr/bin/env ruby
# A simple script to quickly set up Sublime Text 2 to use it in Gnome 3.
#
# It will:
# * copy the official Sublime icons into your ~/.local/share/icons/hicolor/[...]
# * make a symlink to sublime_text in your ~/bin/
# * create a sublime_text_2.desktop in ~/.local/share/applications/
#
# Licence: WTFPL
@tijn
tijn / quassel-gnome3.qss
Last active October 5, 2015 19:08
stylesheet for quassel in gnome 3 (adwaita)
/*
QT Stylesheet to make Quassel fit better with Gnome3
====================================================
I stole these colours from a vim-config:
-----------------------------------------
Adwaita:
- cool-fg #000000
@tijn
tijn / delete_line.rb
Created May 4, 2012 11:33
script to delete one line from a file, uses input like this: ~/.ssh/known_hosts:60
#!/usr/bin/env ruby
# script to delete one line from a file
# because remembering how sed works is too hard
# Tijn Schuurmans - May 4, 2012
def print_usage
puts <<-end_usage_description
delete_line
require 'benchmark'
def do_it(n = 1_000_000)
Benchmark.bm(15) do |bm|
foo = :foo
bm.report("Symbol == Symbol") { n.times { :foo == foo } }
bm.report("to_sym") { n.times { "foo".intern } }
bm.report("hash") { n.times { "foo".hash } }
bar = "bar"
baz = "baz".freeze
@tijn
tijn / equality_in_ruby.rb
Created August 6, 2011 19:31
a self-describing program
# The == comparison operator checks whether two values are equal.
true == true
'==' == '=='
# eql? checks if two values are equal and of the same type.
true.eql? true
@tijn
tijn / scss.xml
Created June 29, 2011 09:23 — forked from razor-x/scss.xml
SCSS syntax highlighting for Kate. Based on Kate CSS syntax file.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<!--
Kate SCSS syntax highlighting definition
A few lines were added to the Kate CSS syntax highlighting definition to support SCSS
The latest version of this file can be found at https://gist.github.com/958598
Changelog:
show lc_collate;
lc_collate
-------------
en_US.UTF-8
(1 row)
soocial_test=# select lower(''), upper(''), lower('ble, trret'), upper('ble, trret'), lower('LUT K'), upper('lut '), lower('');
lower | upper | lower | upper | lower | upper | lower
-------+-------+------------+------------+-------+-------+-------
| | ble, trret | BLE, TRRET | lut k | LUT |