Skip to content

Instantly share code, notes, and snippets.

beakr / search.css
Created Mar 30, 2012
Nice search bar (hand made).
View search.css
.search {
/* Roundness */
border: 1px solid #BABABA;
border-radius: 20px;
height: 35px;
width: 300px;
padding: 8px;
background: white;
beakr / comment_box.css
Created Mar 30, 2012
Expanding nice comment box.
View comment_box.css
.comment_box {
/* Cosmetic */
margin-left: 30px;
margin-top: 50px;
border-radius: 7px;
border-color: #BABABA;
box-shadow: 1px 5px 2px #EDEDED;
height: 130px;
width: 300px; /* Was 470px */
beakr / disable_intro_message.vim
Created Mar 29, 2012
How to disable Vim intro message.
View disable_intro_message.vim
set shortmess=I " Read :help shortmess for everything else.
beakr / gist:2941446
Created Jun 16, 2012
Copy to OSX clipboard from text field (Objective-C).
View gist:2941446
NSPasteboard *pasteBoard = [NSPasteboard generalPasteboard];
[pasteBoard declareTypes:[NSArray arrayWithObjects:NSStringPboardType, nil] owner:nil];
[pasteBoard setString: [_textField stringValue] forType:NSStringPboardType];
View Zip.cpp
void Zip::Open(const char * file)
int error = 0;
// Allocate a buffer that holds the error message string from
// zip_error_to_str.
char buffer[250];
// Open the zip file. Essentially it writes data to the `z' struct
// that holds all the zip file data.
z = zip_open(file, ZIP_CREATE, &error);
beakr / arg_example.rb
Created Jan 12, 2014
Rake task arguments example with evil hacks
View arg_example.rb
# From:
def task_arg(var)
task var.to_sym {}
task :hello do
name = ARGV.last # Get last arg (ARGV.first is task name)
abort "I can't say hello to nobody. :(" if name.empty?
puts "Hello #{name}!"
View obfuscated.rb
def f;m=%,He#{:ll}o #{?w+?o}rld\n,;s=(:a1[1].to_i)-0.5;;m.split(//)
puts((%Q%#{?t+?h}%+%?a?+%{t w#{"aa"[1]}s boring...}));;end;f;
View gist:8288676
/Users/chris/.rvm/gems/ruby-2.0.0-p247/gems/kgio-2.8.1/lib/kgio_ext.bundle: [BUG] Segmentation fault
ruby 2.0.0p353 (2013-11-22 revision 43784) [x86_64-darwin12.4.0]
-- Crash Report log information --------------------------------------------
See Crash Report log file under the one of following:
* ~/Library/Logs/CrashReporter
* /Library/Logs/CrashReporter
* ~/Library/Logs/DiagnosticReports
* /Library/Logs/DiagnosticReports
the more detail of.
beakr / iecomment.html
Created Jan 4, 2014
View iecomment.html
<!--[if lte IE 7]>
Oops! Looks like your browser is <strong>outdated</strong>. This means that
you may not be able to view certain sites correctly. Please download a later
version of the software you use to browse the internet for the best experience.
beakr / Gemfile
Created Jan 4, 2014
Simple Ruby code for parsing markdown in a directory (Github flavoured Markdown, that is).
View Gemfile
# Run 'bundle' in the command line afterward
source ''
gem 'guard'
gem 'guard-rake'
gem 'rake'
gem 'rainbow'
gem 'github-markdown'
You can’t perform that action at this time.