Skip to content

Instantly share code, notes, and snippets.

(custom-set-variables
'(notmuch-fcc-dirs "archive")
'(notmuch-message-headers (quote ("Subject" "To" "Cc" "Date")))
'(notmuch-poll-script "notmuch-rsync")
'(notmuch-search-oldest-first nil)
'(notmuch-show-all-multipart/alternative-parts nil)
'(notmuch-show-indent-messages-width 0)
'(notmuch-show-logo t)
'(notmuch-show-part-button-default-action (quote notmuch-show-view-part))
)
require 'rubygems'
require 'soap/wsdlDriver'
host = "developer-api.affili.net"
factory = SOAP::WSDLDriverFactory.new("https://#{host}/V2.0/Logon.svc?wsdl")
driver = factory.create_rpc_driver
driver.generate_explicit_type = true
driver.wiredump_dev = STDOUT
~/ptwitter/my2cents/trunk $ ant debug
Buildfile: build.xml does not exist!
Build failed
Debugger entered--Lisp error: (file-error "Cannot open load file" "gist")
require(gist)
eval((require (quote gist)))
eval-last-sexp-1(nil)
eval-last-sexp(nil)
call-interactively(eval-last-sexp nil nil)
diff --git a/lib/integrity/builder.rb b/lib/integrity/builder.rb
index 4b6ffa3..af90c8a 100644
--- a/lib/integrity/builder.rb
+++ b/lib/integrity/builder.rb
@@ -37,6 +37,9 @@ module Integrity
def complete
Integrity.log "Build #{commit} exited with #{@status} got:\n #{@output}"
+ # Remove invalid UTF8, see http://po-ru.com/diary/fixing-invalid-utf-8-in-ruby-revisited/
+ @output = (Iconv.iconv('UTF-8//IGNORE', 'UTF-8', @output).first + ' ')[0..-2]
module SpecPageRefresh
class SpecPageRefreshMatcher
include Merb::Test::ViewHelper
def matches?(response)
response.should have_selector('form.hidden_refresh')
rescue Spec::Expectations::ExpectationNotMetError
false
end
@til
til / init.el
Created October 29, 2014 21:10
(defun grep-project (q)
"Search using git grep"
(interactive (list
(read-from-minibuffer "git grep: "
(if (region-active-p)
(buffer-substring-no-properties (region-beginning) (region-end))
(current-word))
nil nil 'grep-project)))
(let ((command
(concat
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
require 'rspec'
require 'set'
class Traverser
attr_reader :elements, :satisfied
def initialize(elements, satisfied:)
@elements = elements
@satisfied = satisfied
end
(defun downcase-word-with-camelcase ()
"This works similar to downcase-word, but additionally inserts
an underscore before upper case chars within camel cased words, so that:
FooBar => foo_bar"
(interactive)
(progn
(if (looking-at-p "\\>") (search-forward-regexp "\\<"))
(let ((start (point)))
(search-forward-regexp "\\>")
(let ((end (point)))