Skip to content

Instantly share code, notes, and snippets.

<div id="header">
<ul class="jumpnav">
<li id="tablink1"><a href="#tab1">Tab 1</a></li>
<li id="tablink2"><a href="#tab2">Tab 2</a></li>
<li id="tablink3"><a href="#tab3">Tab 3</a></li>
<li id="tablink4"><a href="#tab4">Tab 4</a></li>
</ul>
</div>
#panelContatiner{
height:320px;
overflow:hidden;
}
.box {
height:320px;
width:780px;
margin: 0 auto;
padding:10px;
@seenmyfate
seenmyfate / unicorn
Created October 25, 2010 17:11
replicate templates/executable issue
#!/usr/bin/env ruby
#
# capistrano deploy with shared / current directories
# bundle install --gemfile ~/current/Gemfile --deployment --binstubs --path ~/shared/bundle
# ~/current/bin is ls -n -> ~/shared/bin
# replace bin/unicorn with this script, running ~/current/bin/unicorn gives
# bundler 1.02 ~/current/Gemfile
# bundler 1.03 ~/shared/Gemfile
#bundler 1.02
if RUBY_VERSION =~ /1.9/
Encoding.default_external = Encoding::UTF_8
Encoding.default_internal = Encoding::UTF_8
end
# act like vim
# thanks thoughtbot
# http://robots.thoughtbot.com/post/2166174647/love-hate-tmux
setw -g mode-keys vi
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind-key -r C-h select-window -t :-
bind-key -r C-l select-window -t :+
@seenmyfate
seenmyfate / vimrc
Created December 29, 2011 20:07
Starting point
" http://mislav.uniqpath.com/2011/12/vim-revisited/
set nocompatible " choose no compatibility with legacy vi
syntax enable
set encoding=utf-8
set showcmd " display incomplete commands
filetype plugin indent on " load file type plugins + indentation
"" Whitespace
set nowrap " don't wrap lines
@seenmyfate
seenmyfate / gist:4533828
Created January 14, 2013 21:46
within implementation using Command/CompositeCommand
require 'rspec'
require 'stringio'
class Executor
def initialize(io)
@io = io
end
def commands
@commands ||= []
FAIL (1:00:18.482) test_execute_raises_on_non_zero_exit_status_and_captures_stdout_and_stderr
--- expected
+++ actual
@@ -1,3 +1,3 @@
"echo stdout: Nothing written
-echo stderr: Test capturing stderr
+echo stderr: Nothing written
"
@seenmyfate
seenmyfate / Capfile
Created April 23, 2014 07:55
Capistrano v3 custom Submodule Strategy example
require 'capistrano/setup'
require 'capistrano/deploy'
require 'capistrano/scm'
require 'capistrano/git'
class Capistrano::Git < Capistrano::SCM
module SubmoduleStrategy
include DefaultStrategy
def release
@seenmyfate
seenmyfate / verbosity.cap
Created May 1, 2014 09:07
More verbosity on specific Cap v3 tasks
task :debug do
SSHKit.configure { |config| config.output_verbosity = :debug }
end
task :reset_log_level do
SSHKit.configure { |config| config.output_verbosity = fetch(:log_level) }
end
before 'deploy:migrate', 'debug'
after 'deploy:migrate', 'reset_log_level'