Skip to content

Instantly share code, notes, and snippets.

@quellhorst
quellhorst / arrowgasm.less
Created May 9, 2012 22:18 — forked from Kalyse/arrowgasm.less
LessCSS Mixing for Providing Arrows
.arrowgasm(@position: top, @size : "4px", @background-color : #88b7d5, @border-width: "2px", @border-color : #c2e1f5, @arrowClass : "arrow_box"){
(~".@{arrowClass}") {
position: relative;
background: @background-color;
border: @size solid @border-color;
}
(~".@{arrowClass}:after"), (~".@{arrowClass}:before") {
bottom: 100%;
border: solid transparent;
@quellhorst
quellhorst / hack.sh
Created April 1, 2012 01:18 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@quellhorst
quellhorst / the_install.sh
Created November 19, 2011 06:00 — forked from therubymug/the_install.sh
Ruby development environment for OS X (Lion)
#!/usr/bin/env sh
# Title: Ruby development environment for OS X (Lion)
# Author: Rogelio J. Samour
# Warning:
# While it is unlikely any code below might damage your system,
# it’s always a good idea to back up everything that matters to you
# before running this script! Just in case. I am not responsible for
# anything that may result from running this script. Proceed at
# your own risk.

Sass/Less Comparison

In this document I am using Sass's SCSS syntax. You can choose to use the indented syntax in sass, if you prefer it, it has no functional differences from the SCSS syntax.

For less, I'm using the ruby version because this is what they suggest on the website. The javascript version may be different.

Variables

user www www;
worker_processes 5;
error_log logs/error.log;
pid logs/nginx.pid;
worker_rlimit_nofile 8192;
events {
worker_connections 4096;
}
# Adjust sessions so they work across subdomains
# This also will work if your app runs on different TLDs
# from: http://szeryf.wordpress.com/2008/01/21/cookie-handling-in-multi-domain-applications-in-ruby-on-rails/
# modified to work with Rails 2.3.0
module ActionControllerExtensions
def self.included(base)
base::Dispatcher.send :include, DispatcherExtensions
end
# Simple script to send you email when someone unfollows you on twitter.
#
# Replace email on line 24 with the email you want to receive notifications at, and
# twitter handle on line 23 with your own (or whomever you want to track unfollows for).
#
# Set up a crontab to check however often you like. If someone follows and then unfollows you
# very quickly (within the interval), you won't get an email.
#
# Requires that you can send mail from the command line of the environment where
# you're running the script using mailx, e.g. `echo "body" | mailx -s "subject" foo@bar.com
require 'rubygems'
require 'merb-core'
require 'chef'
Chef::Config.from_file(File.join("/etc", "chef", "server.rb"))
Merb::Config.setup(:merb_root => File.expand_path(File.dirname(__FILE__)),
:environment => ENV['RACK_ENV'],
:fork_for_class_load => false,
:init_file => File.dirname(__FILE__) / "config/init.rb")
@quellhorst
quellhorst / default.rb
Created September 4, 2009 02:33 — forked from fujin/default.rb
case platform
when "debian","ubuntu"
set.nginx.dir = "/etc/nginx"
set.nginx.log_dir = "/var/log/nginx"
set.nginx.user = "www-data"
set.nginx.binary = "/usr/sbin/nginx"
else
set.nginx.dir = "/etc/nginx"
set.nginx.log_dir = "/var/log/nginx"
set.nginx.user = "www-data"
@quellhorst
quellhorst / gist:27125
Created November 20, 2008 18:06 — forked from atmos/gist:17913
# multi environment merb deployment with vlad and god
set :application, "ninja"
set :deploy_to, "/data/ninja"
set :code_repo, 'git@github.com:atmos/ninja.git'
set :revision, "origin/master"
set :user, "ey"
set :use_sudo, false
task :production do
role :app, 'eyYY-s00020'