Skip to content

Instantly share code, notes, and snippets.

View mostlyobvious's full-sized avatar

Paweł Pacana mostlyobvious

View GitHub Profile
ata5: link is slow to respond, please be patient (ready=0)
ata5: COMRESET failed (errno=-16)
ata5: link is slow to respond, please be patient (ready=0)
ata5: COMRESET failed (errno=-16)
ata5: link is slow to respond, please be patient (ready=0)
ata5: COMRESET failed (errno=-16)
ata5: limiting SATA link speed to 1.5 Gbps
ata5: COMRESET failed (errno=-16)
ata5: reset failed, giving up
# mongoid and duck typing
def logger=(logger)
case logger
when Logger then @logger = logger
when false, nil then @logger = nil
end
end
import XMonad
import XMonad.Config.Gnome
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.ManageHelpers
import XMonad.Actions.CycleWS
import XMonad.Actions.WindowGo
import XMonad.Util.WindowProperties
import XMonad.Util.EZConfig
import XMonad.Layout.Named
@mostlyobvious
mostlyobvious / my.cnf
Created March 14, 2012 14:29
mysql for tests
default-table-type=innodb
transaction-isolation=READ-COMMITTED
default-character-set=utf8
skip-sync-frm=OFF
innodb_flush_log_at_trx_commit = 0
innodb_flush_method = 0_DIRECT
alias tstamp='date +%Y%m%d%H%M%S'
backup(){
cp -r $1 $1.`tstamp`
}
Rake::TestTask.new('test') do |t|
t.libs << 'lib'
t.libs << 'test'
t.pattern = 'test/**/*_test.rb'
end
task :default => :test
@mostlyobvious
mostlyobvious / hackathon.md
Created February 2, 2012 12:28
DRUG hackathon call
@mostlyobvious
mostlyobvious / .inputrc
Created January 28, 2012 01:08
minimum viable console setup
"\e[A":history-search-backward
"\e[B":history-search-forward
set completion-ignore-case on
set show-all-if-ambiguous on
# muzang.rb
require 'muzang'
require 'muzang-plugins'
class Bshellz
include Muzang::Plugins::Helpers
def initialize(bot)
@bot = bot
end
require 'rest_client'
require 'active_support/concern'
require 'active_support/core_ext/string'
module RspecApiDsl
# This module is almost exact copy from this dsl:
# https://raw.github.com/zipmark/rspec_api_documentation/master/lib/rspec_api_documentation/dsl.rb
#
# I didn't quike like Rails dependency and all that stuff
# so I made few tweaks and attached RestClient.