Skip to content

Instantly share code, notes, and snippets.

@vangberg
vangberg / README
Created February 22, 2009 01:06
Deploying a Sinatra app to Heroku
# Deploying a Sinatra app to Heroku
## Database
The location of the database Heroku provides can be found in the environment
variable DATABASE_URL. Check the configure-block of toodeloo.rb for an example
on how to use this.
## Server
Heroku is serving your apps with thin, with means you have all your thin goodness available,
such as EventMachine.
@gf3
gf3 / html5.vim
Created May 5, 2010 15:27 — forked from rcmachado/html5.vim
vim HTML5 Syntax File
" Vim syntax file
" Language: HTML (version 5)
" Maintainer: Rodrigo Machado <rcmachado@gmail.com>
" URL: http://rm.blog.br/vim/syntax/html.vim
" Last Change: 2009 Aug 19
" License: Public domain
" (but let me know if you liked it :) )
"
" Note: This file just adds the new tags from HTML 5
" and don't replace default html.vim syntax file
@dtjm
dtjm / haml_converter.rb
Created August 10, 2010 16:34
HAML plugin for jekyll
# _plugins/haml_converter.rb
module Jekyll
class HamlConverter < Converter
safe true
def setup
return if @setup
require 'haml'
@setup = true
@nathansmith
nathansmith / web-design-development-learning-resources.md
Last active September 18, 2023 19:08
Resources for learning web design & front-end development
@ocean90
ocean90 / box-shadow.html
Last active March 27, 2024 18:28
CSS3 Box Shadow, only top/right/bottom/left and all
<!DOCTYPE html>
<html>
<head>
<title>Box Shadow</title>
<style>
.box {
height: 150px;
width: 300px;
margin: 20px;
@mamantoha
mamantoha / app.rb
Created October 26, 2011 14:35
Warden integration with Sinatra and DataMapper(w/ BCryptHash) - http://ruby-ua.blogspot.com/2011/10/user-datamapper-bcrypthash-warden.html
# -*- encoding: utf-8 -*-
require 'sinatra'
require 'slim'
require 'warden'
require 'dm-core'
require 'dm-migrations'
require 'dm-timestamps'
require 'dm-validations'
@kylefiedler
kylefiedler / css.snippets
Last active November 7, 2019 16:42
Vim CSS Snippets
#Sass Snippets
snippet @i
@import "${1}";
snippet ext
@extend ${1};
snippet inc
@include ${1}(${2});${3}
snippet @m
@media ${1} {
${2}
@mildred
mildred / transform_layouts.rb
Created December 13, 2011 15:55
Jekyll plugin to have layouts transformed by Converters as well, taken from https://github.com/mojombo/jekyll/pull/351
module Jekyll
class Layout
alias old_initialize initialize
def initialize(*args)
old_initialize(*args)
self.transform
end
@smlombardi
smlombardi / Railscast2.tmTheme
Created January 22, 2012 23:29
Modified version of Railscast theme for Textmate/Sublime Text 2
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Railscasts 2</string>
<key>settings</key>
<array>
<dict>
<key>settings</key>
@kingbin
kingbin / polldaddy_v2.rb
Created January 29, 2012 16:33
automate testing a web project :)
# Using the web automation driver (watir-webdriver) through the tor network
# Automates webpage actions & bypasses the voting limit on polldaddy
# Casts a vote every 3 seconds for a total of 1000 votes
require 'watir-webdriver'
profile = Selenium::WebDriver::Firefox::Profile.new
profile.proxy = Selenium::WebDriver::Proxy.new :http => '127.0.0.1:8118'
b = Watir::Browser.new :firefox, :profile => profile
#b = Watir::Browser.new :firefox
b.goto 'speakimge.wordpress.com/2012/01/25/under-the-covers/'