This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require("http"), | |
url = require("url"), | |
path = require("path"), | |
fs = require("fs") | |
port = process.argv[2] || 8888; | |
http.createServer(function(request, response) { | |
var uri = url.parse(request.url).pathname | |
, filename = path.join(process.cwd(), uri); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Proc | |
def in_discomfort?; :me; end | |
end | |
you_are = you = | |
->(you) do | |
self.inspect until true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem 'fog' # Storage on S3 for carrierwave | |
gem 'rmagick' # Resizes images and makes thumbnails | |
gem 'carrierwave' # Image attachments, newer version doesn't work with local files preview hack | |
gem 'asset_sync' # Syncs assets to S3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require("http"), | |
url = require("url"), | |
path = require("path"), | |
fs = require("fs"), | |
mime = require("mime") | |
port = process.argv[2] || 8888; | |
http.createServer(function(request, response) { | |
var uri = url.parse(request.url).pathname |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
es: | |
errors: | |
messages: | |
expired: "ha expirado, por favor pide una nueva" | |
not_found: "no encontrado" | |
already_confirmed: "ya fue confirmada. Intenta ingresar." | |
not_locked: "no ha sido bloqueada" | |
not_saved: | |
one: "Ha habido 1 error:" | |
other: "Han habido %{count} errores:" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Sorry, this example is with formtastic but I think it would work the same with vanilla rails form helpers --> | |
<%= semantic_form_for @survey do |form| %> | |
<fieldset class="nested_models answers" data-association="answers"> | |
<%- form.object.answers.build %> | |
<%= form.semantic_fields_for :answers do |answer| %> | |
<%- record = answer.object %> | |
<fieldset class="<%= record.new_record? ? :new : nil %>"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!/usr/bin/env bash | |
# this script assumes a fresh Arch Linux 2013.05 x64 | |
export PLUGINHOOK_REPO=${DOKKU_REPO:-"https://github.com/progrium/pluginhook.git"} | |
export DOKKU_REPO=${DOKKU_REPO:-"https://github.com/juranki/dokku.git"} | |
# filesystem conflicts with some other system, so ignore it first | |
pacman -Syu -q --noconfirm --ignore filesystem | |
pacman -S -q --noconfirm --needed \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env ruby | |
# usage: | |
# $ das_download.rb email password | |
# based on various gists from this thread https://gist.github.com/maca/1798070 | |
require "mechanize" | |
require "nokogiri" | |
require "fileutils" | |
class DasDownloader |