Clone repo:
git clone git://github.com/maccman/juggernaut.git
cd juggernaut
Create Heroku app:
heroku create myapp --stack cedar
heroku addons:add redistogo:nano
git push heroku master
#!/bin/bash | |
# Script and configuration to test analyser | |
# | |
# Check arguments | |
hostname=$1 | |
indexname=$2 | |
if [ -z "$hostname" ] || [ -z "$indexname" ] | |
then |
// Create a Paper.js Path to draw a line into it: | |
var hexagon = new Path(); | |
// Color our path black | |
hexagon.strokeColor = 'black'; | |
// How many points do we want our object to have | |
var points = 6; | |
// How large should it be | |
var radius = 60; | |
// 0 to 2PI is a circle, so divide that by the number of points |
# An example of elasticsearch & Tire setup for ActiveRecord associations. | |
# | |
# A `Book has_many :chapters` scenario, with mapping and JSON serialization | |
# for indexing associated models. | |
# | |
# Demonstrates three important caveats as of now: | |
# | |
# 1. You you have to use `touch: true` in the `belongs_to` declaration, | |
# to automatically notify the parent model about the update. | |
# |
# encoding: UTF-8 | |
module ApplicationHelper | |
# Utilitaire pour faire un lien dans un li qui applique des classe "current" | |
# automatiquement. | |
# | |
# Arguments : | |
# - nom : nom du lien | |
# - url : chemin vers la page |
load 'config/deploy' | |
desc "FTP Sync" | |
namespace :deploy do | |
desc "Sync and compile to remote by default" | |
task :default do | |
#assets.sprite | |
#assets.compile | |
remote.default |
#!/bin/bash | |
# herein we backup our indexes! this script should run at like 6pm or something, after logstash | |
# rotates to a new ES index and theres no new data coming in to the old one. we grab metadatas, | |
# compress the data files, create a restore script, and push it all up to S3. | |
TODAY=`date +"%Y.%m.%d"` | |
INDEXNAME="logstash-$TODAY" # this had better match the index name in ES | |
INDEXDIR="/usr/local/elasticsearch/data/logstash/nodes/0/indices/" | |
BACKUPCMD="/usr/local/backupTools/s3cmd --config=/usr/local/backupTools/s3cfg put" | |
BACKUPDIR="/mnt/es-backups/" | |
YEARMONTH=`date +"%Y-%m"` |
after "deploy:symlink", "deploy:restart_workers" | |
after "deploy:restart_workers", "deploy:restart_scheduler" | |
## | |
# Rake helper task. | |
# http://pastie.org/255489 | |
# http://geminstallthat.wordpress.com/2008/01/27/rake-tasks-through-capistrano/ | |
# http://ananelson.com/said/on/2007/12/30/remote-rake-tasks-with-capistrano/ | |
def run_remote_rake(rake_cmd) | |
rake_args = ENV['RAKE_ARGS'].to_s.split(',') |
Clone repo:
git clone git://github.com/maccman/juggernaut.git
cd juggernaut
Create Heroku app:
heroku create myapp --stack cedar
heroku addons:add redistogo:nano
git push heroku master
egrep -lRZ "\.jpg|\.png|\.gif" . \ | |
| xargs -0 -l sed -i -e 's/\.jpg\|\.gif\|\.png/.bmp/g' | |
#egrep: find matching lines using extended regular expressions | |
# -l: only list matching filenames | |
# -R: search recursively through all given directories | |
# -Z: use \0 as record separator | |
# "\.jpg|\.png|\.gif": match one of the strings ".jpg", ".gif" or ".png" | |
# .: start the search in the current directory | |
#xargs: execute a command with the stdin as argument |