I hereby claim:
- I am sideshowcoder on github.
- I am sideshowcoder (https://keybase.io/sideshowcoder) on keybase.
- I have a public key ASAEE-dQHXaxnF5kXmIlTg3XB_YoqdRpORJs-L2ImDIItgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
require 'test_helper' | |
# testing rake task app:awesome_report | |
# defined in file lib/tasks/app/awesome_report.rake | |
describe 'App::AwesomeReportTaskTest' do | |
it 'generates the awesomeness report' do | |
subject.invoke | |
assert File.exists?('awesomeness_report.csv') | |
end |
open System | |
type Token = | |
| Number of int | |
| UnaryOperator of (int -> int -> int) | |
let tryCharToToken a = | |
match (Int32.TryParse a) with | |
| (true, num) -> Some (Number num) | |
| (false, _) -> |
(defun setup-docker-machine-env () | |
" Parse the output of docker-machine env and setup the needed env vars" | |
(interactive) | |
(mapcar | |
(lambda (e) | |
(if e | |
(let ((var-value (split-string-and-unquote (car e) "="))) | |
(setenv (s-chop-suffix "=" (car var-value)) (car (cdr var-value)))))) | |
(mapcar | |
(lambda (e) |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
export PS1="\u@\h \w\$(parse_git_branch) \\$ " |
var couchbase = require("couchbase") | |
var async = require("async") | |
var db = new couchbase.Connection({}) | |
// create insert function which expects just a callback | |
function insertFormObject(object) { | |
return function (cb) { | |
db.set(object._id, object.value, cb) | |
} |
;; automatically open a file as sudo unless we have permission to write it | |
;; already, after all this is my machine and I can do what I want! | |
(defadvice ido-find-file (after find-file-sudo activate) | |
"Find file as root if necessary." | |
(unless (and buffer-file-name | |
(file-writable-p buffer-file-name)) | |
(find-alternate-file (concat "/sudo:root@localhost:" buffer-file-name)))) |
(defun coder/rspec-file () | |
"Run rspec on the current file and set as the compile target, | |
if we have zeus available than run it via zeus otherwise run it | |
via bundle exec rspec" | |
(interactive) | |
(projectile-with-default-dir (projectile-project-root) | |
(let ((command-prefix (rake--choose-command-prefix (projectile-project-root) (list :zeus "zeus test " | |
:bundler "bundle exec rspec ")))) | |
(compile (concat command-prefix (coder/project-relative-current-file-path)))))) |
# On the server side split the core file into 50M chunks naming them core.0000000000 etc. | |
# $ split -a 10 -b 50M -d core core. | |
# reassamble on the other side via | |
# $ cat core.* > core | |
chunk_count = 538 | |
root_name = "core." # name on server is 'core.00001 etc' | |
host = "myhost.com" | |
path = "/tmp" |
;; URL for current branch PR should | |
;; look like this: | |
;; https://github.com/sideshowcoder/tbrokersetip/compare/master...sideshowcoder-patch-1?quick_pull=1 | |
;; (requires magit) | |
(defun coder/string-remove-until (string seperator) | |
(nth 1 (split-string string seperator))) | |
(defun coder/string-remove-after (string seperator) | |
(nth 0 (split-string string seperator))) |