This file contains 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
(defun insert-unix-timestamp () | |
"Insert the current time as unix timestamp." | |
(interactive) | |
(insert (format-time-string "%s"))) |
This file contains 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
var wrapperId = 'wrapperIdOnPage'; | |
var | |
$w = $(window), | |
$wrap = $('#'+wrapperId), | |
followerInitialOffset = $wrap.offset().top, | |
marginTop = 0, | |
$wrap, windowTop, windowBottom, followerHeight, | |
followerTop, followerBottom, followerBottomPosition | |
; |
This file contains 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
Debugger entered--Lisp error: (void-variable package-updating) | |
byte-code("\304\302 !\305\306r\307 q\210\310\311\312\313\n\"D\314 \"\315\316\n!\314 \n\232\"\210\315\317 !\320 \235\"*%\207" [package-updating nicknames package-name p def-slime-test "Test if slime-lisp-package is updated." (("COMMON-LISP" ("CL")) ("KEYWORD" ("" "KEYWORD" "||")) ("COMMON-LISP-USER" ("CL-USER"))) slime-output-buffer slime-eval swank:listener-eval format "(cl:setq cl:*print-case* :upcase)\n (cl:setq cl:*package* (cl:find-package %S))\n (cl:package-name cl:*package*)" slime-lisp-package slime-check "slime-lisp-package is %S." "slime-lisp-package-prompt-string is in %S." slime-lisp-package-prompt-string] 10) | |
require(slime-repl) | |
eval-buffer(#<buffer *load*-522527> nil "/Users/sebastian/.emacs.d/elpa/slime-js-0.0.1/slime-js.el" nil t) ; Reading at buffer position 1637 | |
load-with-code-conversion("/Users/sebastian/.emacs.d/elpa/slime-js-0.0.1/slime-js.el" "/Users/sebastian/.emacs.d/elpa/slim |
This file contains 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
setTimeout(function () { | |
if(window.location.hash) { | |
var hashLocation = window.location.hash; | |
window.scrollTo(0,0); | |
$(document).scrollTop( $(hashLocation).offset().top + 300 ); | |
} | |
}, 1); |
This file contains 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
(defun wrap-tag () | |
(interactive) | |
(let ((name (symbol-at-point))) | |
(insert (concat "<" (symbol-name name) ">" "</" (symbol-name name) ">")))) |
This file contains 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 bold new beginning | |
(defun git-status (dir) | |
"Show magit status for dir" | |
(interactive (list (read-directory-name "Git project dir: "))) | |
(magit-status (expand-file-name dir))) |
This file contains 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 Ctrl+O as bind key | |
unbind C-b | |
unbind C-o | |
set -g prefix C-o | |
# Use vi key bindings to navigate | |
set-window-option -g mode-keys vi | |
# Use Ctrl+O, O to switch back and forth between panes | |
bind-key C-o last-window |
This file contains 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
class Thing | |
def foo | |
puts "I'm a foo" | |
end | |
def bar | |
puts "I'm a bar" | |
end | |
def baz |
This file contains 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
gsub_file "Gemfile", /gem 'rails'.*/, "" | |
gem "hpricot" |
This file contains 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
module Foo | |
def make_a_thing | |
self.class.new | |
end | |
end | |
class Bar | |
include Foo | |