start new:
tmux
start new with session name:
tmux new -s myname
#!/bin/bash | |
grep -r -E '[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}' * |
;; Color stuffs | |
;; default colors | |
(when window-system | |
(add-to-list 'default-frame-alist '(background-color . "black")) | |
(add-to-list 'default-frame-alist '(foreground-color . "wheat"))) | |
(defun default-colors () | |
(interactive) | |
(set-background-color "black") |
brew tap Caskroom/cask | |
brew install Caskroom/cask/wkhtmltopdf | |
wkhtmltopdf http://google.com google.pdf |
#!/usr/bin/env ruby | |
# A simply utility to show character counts for each line of input and | |
# highlight lines longer than 80 characters. | |
# | |
# Written as an example for http://jstorimer.com/2011/12/12/writing-ruby-scripts-that-respect-pipelines.html | |
# | |
# Examples: | |
# | |
# $ hilong Gemfile |
# Task: Implement the rcat utility and get these tests to pass on a system | |
# which has the UNIX cat command present | |
# To see Gregory Brown's solution, see http://github.com/elm-city-craftworks/rcat | |
# Feel free to publicly share your own solutions | |
rrequire "open3" | |
working_dir = File.dirname(__FILE__) | |
gettysburg_file = "#{working_dir}/data/gettysburg.txt" |
;;; randomize-region.el --- randomize line order in a region | |
;; Copyright (C) 2005 Joe Corneli <[EMAIL PROTECTED]> | |
;; Copyright (C) 1986, 1987, 1993, 1994, 1995, 2003 Free Software Foundation, | |
Inc. | |
;; Time-stamp: <jac -- Tue Apr 26 15:30:27 CDT 2005> | |
;; This file is not part of GNU Emacs, but it is distributed under | |
;; the same terms as GNU Emacs. |
#!/usr/bin/ruby | |
COMMIT_FILE = File.expand_path(ARGV[0]) | |
current_branch=`git branch | grep '*' | awk '{print $2}'` | |
commit_msg = File.read(COMMIT_FILE) | |
current_branch << commit_msg | |
File.open(COMMIT_FILE, 'w') {|f| f << current_branch} |
module Foo | |
def self.included(base) | |
base.extend(ClassMethods) | |
end | |
module ClassMethods | |
def bar | |
puts 'class method' | |
end | |
end |