Skip to content

Instantly share code, notes, and snippets.

@hlb
hlb / config.rb
Created October 5, 2011 15:24
Use Compass.app to watch a folder, and generate CSS just in that folder.
css_dir = "."
sass_dir = "."
line_comments = false
@hlb
hlb / orz.css
Created November 29, 2011 04:54
#sidebar {
float: left;
width: 300px; }
@media only screen and (max-width: 479px) {
#sidebar {
float: none; } }
@media only screen and (min-width: 480px) and (max-width: 767px) {
#sidebar {
float: none; } }
@media only screen and (min-width: 768px) and (max-width: 959px) {
@hlb
hlb / .inputrc
Created November 30, 2011 04:42
"\e[1~": beginning-of-line
"\e[2~": yank
"\e[3~": delete-char
"\e[4~": end-of-line
"\e[5~": history-search-backward
"\e[6~": history-search-forward
$if term=xterm
"\e[2;5~": yank
"\e[3;5~": delete-char
"\e[5;5~": history-search-backward
defc1 off
defencoding utf8
defflow off # turn off stupid flow-control (also see: stty -ixon in ~/.zshrc)
altscreen on # restore window contents after "vim", etc.
ignorecase on # for searches
defscrollback 10000 # number of lines reachable via ^A<esc>
# defwrap off # screen's word wrap is not what you want
startup_message off
vbell_msg ""
defmonitor on
table {
{
color: green;
&.colortable {
color: blue;
{
td {
text-align: center;
}
}
@hlb
hlb / _Users_hlb_dev_path_menu_sass_app_scss_mixin
Created December 29, 2011 01:24
Compass.app auto complete
"adjust-font-size-to($to-size, $lines, $from-size)"
"adjust-leading-to($lines, $font-size)"
"alternating-rows-and-columns($even-row-color, $odd-row-color, $dark-intersection, $header-color, $footer-color)"
"appearance($ap)"
"apply-origin($origin, $only3d)"
"apply-side-rhythm-border($side, $width, $lines, $font-size, $border-style)"
"backface-visibility($visibility)"
"background($background-1, $background-2, $background-3, $background-4, $background-5, $background-6, $background-7, $background-8, $background-9, $background-10)"
"background-clip($clip)"
"background-image($image-1, $image-2, $image-3, $image-4, $image-5, $image-6, $image-7, $image-8, $image-9, $image-10)"
module ViewHelpers
def body_classes
@body_classes ||= []
end
def random( n )
rand(n)
end
module WEBrick
module HTTPServlet
class PhpHandler < AbstractServlet
def initialize(server, name)
super(server, name) if( server )
@root_path = Compass.configuration.project_path
@script_filename = name
end
@hlb
hlb / Gemfile
Created February 22, 2012 18:06
command line
source 'https://rubygems.org'
gem 'rails', '3.2.1'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3'
#data {
background: url(../images/sample.gif);
background: url(../images/bg.png) 5px 95% no-repeat; }
#data {
background: url(../images/default_sample.gif);
background: url(../images/default_bg.png) 5px 95% no-repeat; }