Skip to content

Instantly share code, notes, and snippets.

View peteryates's full-sized avatar
🪶

Peter Yates peteryates

🪶
View GitHub Profile
@peteryates
peteryates / sample call
Created April 17, 2013 09:32
Simple thesaurus wrapper for the metanym gem
~»thesaurus boot
Boot:
Synonym: brogan, footwear, galoshes, mukluk, oxford, snow shoes, waders, waters
Antonym: aid, defend, protect, resist, retreat, shelter, shield, submit, support, surrender, sustain
@peteryates
peteryates / Destination Types
Created March 6, 2013 10:43
RECURSIVE QUERIES IN POSTGRESQL 8.4 BETA Originally posted http://pastie.org/539924
id | name
----+--------------
1 | COUNTRY
2 | ISLAND GROUP
3 | TOWN
4 | ISLAND
(4 rows)
@peteryates
peteryates / colour_blame_age.rb
Last active December 11, 2015 15:28
Colourise SVN blame
#!/usr/bin/env ruby-local-exec
require 'colorize'
def get_revision_number(line)
line.split(" ").first.to_i
end
def revision_position(revisions, number)
revisions[number] || revisions.last
@peteryates
peteryates / gist:1986294
Created March 6, 2012 13:33
inxi output
peter@tecra:/home/peter$ inxi -v4 -c6 OR inxi -s -bDc -A5 -xx
System: Host: tecra Kernel: 3.2.8-1-ARCH x86_64 (64 bit, gcc: 4.6.2) Desktop: Gnome (Gtk 3.2.3) Distro: Arch Linux
Machine: System: TOSHIBA product: TECRA M11-17 version: PTME1E-01M031EN
Mobo: TOSHIBA model: Portable PC version: Version A0 Bios: TOSHIBA version: Version 3.20 date: 06/27/2011
CPU: Dual core Intel Core i7 CPU M 640 (-HT-MCP-) cache: 4096 KB flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 11177.1
Clock Speeds: 1: 2792.896 MHz 2: 2792.896 MHz 3: 2792.896 MHz 4: 2792.896 MHz
Graphics: Card: Intel Core Processor Integrated Graphics Controller bus-ID: 00:02.0
X.Org: 1.11.4 driver: intel Resolution: 1366x768@60.2hz, 1600x1200@60.0hz
GLX Renderer: Mesa DRI Intel Ironlake Mobile GLX Version: 2.1 Mesa 7.11.2 Direct Rendering: Yes
Network: Card-1: Intel Centrino Advanced-N 6200 driver: iwlwifi ver: in-tree: bus-ID: 02:00.0