This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
QT Stylesheet to make Quassel fit better with Gnome3 | |
==================================================== | |
I stole these colours from a vim-config: | |
----------------------------------------- | |
Adwaita: | |
- cool-fg #000000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# preliminary: | |
# | |
# git clone remote_repo repo | |
# cd repo | |
# for remote in `git branch -r | grep -v master `; do git checkout --track $remote ; done | |
def git_repo(subdir) | |
if File.directory?(subdir + "/.git") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = (robot) -> | |
robot.hear /\bfucking\s+?(\w+)/i, (msg) -> | |
msg.send "fucking #{msg.match[1]} indeed".toUpperCase() | |
robot.hear /\bfuck(\s+?(?:my|your|this|those|these|our))?\s+?(\w+)/i, (msg) -> | |
pronoun = msg.match[1] | |
subject = msg.match[2] | |
pronoun = pronoun.trim().toLowerCase() if pronoun |
OlderNewer