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 | |
current_time=$(date "+%Y.%m.%d-%H.%M") | |
for n in $(heroku apps | grep prod | cut -d ' ' -f 1) | |
do | |
echo "backing up: $n" | |
heroku pg:backups:download --app $n -o /backup/heroku/$n.dump | |
done | |
echo "Finished" | |
# Rotation durch logrotate |
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
# -*- encoding : utf-8 -*- | |
require 'net/http' | |
class Ga | |
attr_accessor :user, :category, :action | |
# target for trackings in test environment | |
TRACKINGS = [] |
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 String | |
UNACCENT_HASH = { | |
'A' => 'ÀÁÂÃÄÅĀĂǍẠẢẤẦẨẪẬẮẰẲẴẶǺĄ', | |
'a' => 'àáâãäåāăǎạảấầẩẫậắằẳẵặǻą', | |
'C' => 'ÇĆĈĊČ', | |
'c' => 'çćĉċč', | |
'D' => 'ÐĎĐ', | |
'd' => 'ďđ', | |
'E' => 'ÈÉÊËĒĔĖĘĚẸẺẼẾỀỂỄỆ', | |
'e' => 'èéêëēĕėęěẹẻẽếềểễệ', |
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 authorized_keys { | |
# install the given keys in the users authorized_keys file | |
# user name is given as title, keys are names of template files located in | |
# the modules templates directory | |
# | |
# key names are expanded to $keydir/<name>.pub. This ensures minimal writing | |
# and maintains compatibility with other tools like gitosis. | |
define install( keys = [ "seb" ], keydir = "/etc/puppet/files/ssh_keys" ) { | |
$home = $title ? { "root" => "/root", default => "/home/$title" } |
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
require 'tempfile' | |
tmp = Tempfile.new('poor_mans_profiler') | |
ObjectSpace.each_object {|obj| tmp << obj.to_s+"\n" if obj.is_a?(String) } | |
tmp.flush | |
%pre=tmp.path | |
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
node "works" { | |
include rails # where 'rails' can be an empty class... | |
file { "/etc/apache2/sites-available/railsapp": | |
ensure => present, | |
source => "puppet:///modules/rails/apache", | |
} | |
} | |
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
# git-ls-files --others --exclude-from=.git/info/exclude | |
# Lines that start with '#' are comments. | |
# For a project mostly in C, the following would be a good set of | |
# exclude patterns (uncomment them if you want to use them): | |
# *.[oa] | |
*~ | |
\#*\# | |
config/database.yml | |
coverage/ | |
db/*.sqlite3.db |
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
require 'erb' | |
require 'tempfile' | |
class Pdflatex | |
TEMPLATE_DIR = File.join(RAILS_ROOT, 'app', 'views', 'tex') | |
def self.run(template_path, locals = nil) | |
template = File.new(template_path).read | |
erb = ERB.new(template) |
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
OnDesktop Mouse1 :HideMenus | |
OnDesktop Mouse2 :WorkspaceMenu | |
OnDesktop Mouse3 :RootMenu | |
OnDesktop Mouse4 :NextWorkspace | |
OnDesktop Mouse5 :PrevWorkspace | |
Mod1 Tab :NextWindow | |
Mod1 Shift Tab :PrevWindow | |
Mod1 F1 :Workspace 1 | |
Mod1 F2 :Workspace 2 |
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
" gui settings | |
set noanti guifont=Monaco:h10 | |
set transparency=0 | |
colorscheme macvim | |
set background=dark | |
" no toolbar in guimode | |
set guioptions-=T | |
if has("gui_macvim") |
NewerOlder