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
# From http://www.regular-expressions.info/email.html | |
# Do NOT use it! | |
/(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/ |
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
# Another example with YAML. Consider this file (the <c> is my cursor): | |
en: | |
test: | |
hello: "World"<c> | |
# Now I press Enter | |
en: | |
test: | |
hello: "World" |
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
From e8c5bc23295e6a5ead501a74e73ac4cca507d3d8 Mon Sep 17 00:00:00 2001 | |
From: Johannes Barre <[email protected]> | |
Date: Sat, 23 Jul 2011 11:03:23 +0200 | |
Subject: [PATCH] Use svn switch instead of svn update | |
--- | |
lib/capistrano/recipes/deploy/scm/subversion.rb | 8 +++++--- | |
test/deploy/scm/subversion_test.rb | 7 +++++++ | |
2 files changed, 12 insertions(+), 3 deletions(-) |
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
source 'http://rubygems.org' | |
gem 'rails', '3.1.1' | |
gem 'mysql2' | |
gem 'json' | |
gem 'fast-aes' | |
# Gems used only for assets and not required | |
# in production environments by default. | |
group :assets do |
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
server { | |
listen 80; | |
server_name stage.example.com; | |
access_log /var/log/nginx/stage.example.com.access.log; | |
error_log /var/log/nginx/stage.example.com.error.log warn; | |
root /home/igel/www/stage.example.com/current/public; | |
passenger_enabled on; | |
rails_env stage; |
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
error_page 503 /system/maintenance.html; | |
location / { | |
passenger_enabled on; | |
if ( -f $document_root/system/maintenance.html ) { | |
return 503; | |
} | |
} | |
location = /system/maintenance.html { | |
} |
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 Date | |
# Returns the monday of the given week number | |
def self.by_iso_weekno(year, weekno) | |
# January 4th is always in the first week according to ISO 8601 | |
date = Date.civil(year, 1, 4) + (weekno - 1) * 7 | |
date - (date.wday != 0 ? date.wday - 1 : 6) % 7 | |
end | |
end |
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
#!/bin/bash | |
# Takes the last token of the branch name (separated with an underscore) | |
# takes adds is into the commit message. | |
# | |
# Note: If you want to about committing from the editor, remove the tag and save the file | |
# | |
# 1) Put this file into .git/hooks/prepare-commit-msg | |
# 2) Make it executable: chmod +x .git/hooks/prepare-commit-message |
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
Xft.dpi: 96 | |
URxvt.font: xft:DejaVu\ Sans\ Mono:size=11 | |
URxvt.scrollBar: off | |
URxvt.saveLines: 4096 | |
URxvt.perl-ext-common: default,url-select,keyboard-select,font-size,clipboard | |
URxvt.urlLauncher: xdg-open |
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 | |
require 'net/http' | |
require 'json' | |
require 'uri' | |
class Light | |
GREEN_ID = 4762304 | |
RED_ID = 4762303 |
OlderNewer