cap deploy:setup
# will create shared dir's and symlinks for assets
# db, log and "public/system"
cap deploy
# Let's go
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
sudo su | |
apt-add-repository ppa:chromium-daily/ppa | |
apt-add-repository ppa:eee-control/eee-control | |
apt-add-repository ppa:ubuntu-mozilla-daily/ppa | |
apt-get update && sudo apt-get install build-essential eee-control vlc cpufrequtils \ | |
powertop htop install libncurses-dev libgnome2-dev libgtk2.0-dev libatk1.0-dev \ | |
libbonoboui2-dev libcairo2-dev libx11-dev libxpm-dev libxt-dev git-core guake \ | |
openssh-server chromium-browser thunderbird thunderbird-locale-de \ | |
exuberant-ctags ack-grep python-pygments |
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
# Download latest Drupal | |
version="7.12" | |
wget http://ftp.drupal.org/files/projects/drupal-$version.tar.gz | |
tar xf drupal-$version.tar.gz | |
mv drupal-$version/.* . -f | |
mv drupal-$version/* . | |
rm drupal-$version.tar.gz -rf drupal-$version | |
rm *txt -f | |
wget http://ftp.drupal.org/files/translations/7.x/drupal/drupal-7.11.de.po -O profiles/standard/translations/drupal-7.11.de.po | |
chown www-data\: sites/default/ -R |
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 "net/imap" | |
require "progressbar" | |
require "active_support/all" # sort_by! | |
class Array | |
def histogram ; self.sort.inject({}){|a,x|a[x]=a[x].to_i+1;a} ; end | |
end | |
server = "mailserver.com" | |
username = "mail@mailserver.com" |
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 | |
# Run with podcast-download.sh http://linktofeed.xml | |
# should work in BusyBox (my NAS is an ARM Linux with busybox) | |
set -e # exit when one line has error | |
filename="/tmp/rssdwn-$(date +%s)" | |
curl $1 2> /dev/null | grep enclosure | sed "s/.*\(http[^\"\?]*\).*/\1/" > $filename | |
echo "Found $(wc -l $filename) Links, start downloading to pwd" |
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 | |
def download_url(url) | |
url.gsub!(" ","%20") | |
# TODO better escaping of stuff like umlauts | |
# url.gsub!("ö","%C3%B6") | |
logo_path = url.split("/").last | |
io = open(url) | |
io.define_singleton_method(:original_filename) do | |
logo_path |
e.g. for user stefan
, starting two different applications, located under /apps/APPLICATION/prod/current
.
This script is very useful, because it is run at startup of server, so no 503 anymore.
Put this script under /etc/init.d/
and make it executable chmod +x /etc/init.d/rails_apps
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
# paste into ~/.earthquake/config | |
Earthquake.init do | |
command :replies do |m| | |
thread = [twitter.status(m[1])] | |
r = twitter.get "/related_results/show/#{273873995647045633}.json" | |
results = r.first["results"].map{|i|i["value"]} | |
results.reverse_each.with_index do |t,i| | |
t["_mark"] = config[:thread_indent] * i |
OlderNewer