This file contains hidden or 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 | |
| require 'rubygems' | |
| require 'nokogiri' | |
| passwords = Nokogiri::XML(IO.read(ARGV.first)) | |
| def tags_for(entry) | |
| if entry.parent.attribute("type").to_s == "folder" | |
| [entry.parent.xpath('name').text.downcase] + tags_for(entry.parent) |
This file contains hidden or 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
| # Use multistage (require gem capistrano-ext) | |
| require 'capistrano/ext/multistage' | |
| set :stages, %w(sandbox unstable staging production) | |
| set :default_stage, 'unstable' | |
| set :application, "tryphon puppet" | |
| set :deploy_to, "/var/lib/puppet/conf" |
This file contains hidden or 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
| a | |
| ai | |
| aie | |
| aient | |
| aies | |
| ait | |
| as | |
| au | |
| aura | |
| aurai |
This file contains hidden or 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
| # rake --trace spec | |
| (in /home/alban/share/projects/dryade/stop-area-clustering) | |
| ** Invoke spec (first_time) | |
| ** Invoke db:test:prepare (first_time) | |
| ** Invoke db:abort_if_pending_migrations (first_time) | |
| ** Invoke environment (first_time) | |
| ** Execute environment | |
| rake aborted! | |
| no such file to load -- i18n/backend | |
| /var/lib/gems/1.8/gems/activesupport-2.3.8/lib/active_support/vendor/i18n-0.3.7/i18n.rb:32:in `backend' |
This file contains hidden or 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
| stif_chouette=# EXPLAIN update chouette.vehiclejourneyatstop_tmp set vehiclejourneyid = v.id_new from chouette.vehiclejourney_tmp v WHERE v.id = vehiclejourneyid; | |
| QUERY PLAN | |
| --------------------------------------------------------------------------------------------- | |
| Hash Join (cost=59166.51..3706640.95 rows=10308224 width=1096) | |
| Hash Cond: (vehiclejourneyatstop_tmp.vehiclejourneyid = v.id) | |
| -> Seq Scan on vehiclejourneyatstop_tmp (cost=0.00..632584.24 rows=10308224 width=1096) | |
| -> Hash (cost=48648.45..48648.45 rows=605045 width=16) | |
| -> Seq Scan on vehiclejourney_tmp v (cost=0.00..48648.45 rows=605045 width=16) |
This file contains hidden or 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
| # Full-screen your emacs | |
| # requires wmctrl : apt-get install wmctrl | |
| # found in http://www.emacswiki.org/emacs/FullScreen | |
| (defun switch-full-screen () | |
| (interactive) | |
| (shell-command (concat "wmctrl -i -r " (frame-parameter nil 'outer-window-id) " -btoggle,fullscreen"))) |
This file contains hidden or 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/jekyll to load jekyll extensions | |
| require 'rubygems' | |
| require 'jekyll' | |
| module Jekyll | |
| class << self |
This file contains hidden or 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
| # Inspired from @iain_nl post : | |
| # http://iain.nl/2009/04/rspec-shoulda-and-custom-matchers/ | |
| module LinkToMatcher | |
| include Spec::Rails::Matchers | |
| def have_link_to(url) | |
| AssertSelect.new(:assert_select, self, "a[href=#{url}]") | |
| end | |
| end |
This file contains hidden or 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
| Mar 15 14:16:44 hyppo caed: Starting ALSA Play Device rd0: | |
| Mar 15 14:16:44 hyppo caed: Format = 16 bit little-endian | |
| Mar 15 14:16:44 hyppo caed: SampleRate = 44100 | |
| Mar 15 14:16:44 hyppo caed: Aggregate Channels = 2 | |
| Mar 15 14:16:44 hyppo caed: Periods = 4 | |
| Mar 15 14:16:44 hyppo caed: BufferSize = 4096 frames | |
| Mar 15 14:16:44 hyppo caed: Device started successfully | |
| Mar 15 14:16:44 hyppo caed: Starting ALSA Capture Device rd0: | |
| Mar 15 14:16:44 hyppo caed: Format = 16 bit little-endian | |
| Mar 15 14:16:44 hyppo caed: SampleRate = 44100 |
This file contains hidden or 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
| #!/bin/sh | |
| # List processes which are using alsa devices | |
| lsof +D /dev -F rt | awk '/^p/ {pid=$1} /^t/ {type=$1} /^r0x(74|e)..$/ && type == "tCHR" {print pid}' | cut -c 2- | uniq | xargs ps -fp |