Skip to content

Instantly share code, notes, and snippets.

@skiold
skiold / reporter.sh
Last active December 14, 2015 14:18
#!/bin/sh
REPORT_DATES="2013-02-28 2013-03-01 2013-03-02 2013-03-03 2013-03-04 2013-03-05"
LOGDIR=logs
function total() {
for date in $REPORT_DATES ; do
echo "Report for $date ========================"
awk "/^${date} [0-9:]* .* (==|=>)/ {print \$5}" ${LOGDIR}/* |
sort |
0x6D pageup
0x6E pagedown
0x69 enter
0x6B esc
0x68 screenlock # toolbox
0x6c direction # rotate screen
External tools used for image shrinking.
JPEG:
* jpegtran (http://jpegclub.org/jpegtran/; included in libjpeg-progs package
on Ubuntu)
- centos6, repo base, libjpeg-turbo
* Jpegoptim (http://www.kokkonen.net/tjko/projects.html)
- no package
- requires libjpeg >= v6a (http://www.ijg.org/)
@skiold
skiold / gist:5909653
Created July 2, 2013 14:14
notes on git, merging and workflows
# notes for a internal session on merging
* keep a helper copy of the repo around. Its cheap!
* pick files from a given copi using : git checkout branch_name -- path/to/file
* 'git diff --cached' to double check (eg unmerged files)
* 'git merge -s theirs/ours'
* 'git diff 4_stories_page...4_pagination '
## git config
@skiold
skiold / minimal.rb
Last active December 20, 2015 09:59
class MinimalExample < FPM::Cookery::Recipe
homepage 'https://gist.github.com/skiold/6112283'
section 'Utilities'
name 'minimal-example'
version '3.2.2'
description 'fail fast example'
revision 0
vendor 'fpm'
maintainer '<adrians@aptivate.org>'
#
# Determines the absolute path to the running script. This is useful for
# needing to muck around in the running directory when the script has been
# called using a relative path
#
getScriptAbsolutePath() {
if [[ ${0:0:1} == '/' ]]; then
# If the script was called absolutely
absPath=${0}
else
@skiold
skiold / .vagrant.d_Vagrantfile
Created October 8, 2013 10:28
Vagrantfile for vagrant-aws using ami that depends on a ec2-user (fix requiretty in sudo)
Vagrant.configure("2") do |config|
config.vm.provider :aws do |aws, override|
aws.access_key_id = "#{ENV['AWS_ACCESS_KEY']}"
aws.secret_access_key = "#{ENV['AWS_SECRET_KEY']}"
aws.keypair_name = "your keypair id"
end
end
#!/usr/bin/env bash
echo ">>> Starting Install Script"
# Update
sudo apt-get update
echo ">>> Installing Base Items"
# Install base items
#!/usr/bin/env bash
echo ">>> Starting Install Script"
# Update
sudo apt-get update
echo ">>> Installing Base Items"
# Install base items
@skiold
skiold / gist:8010009
Created December 17, 2013 18:22 — forked from oremj/gist:388608
#!/bin/bash
#
# chkconfig: 35 68 38
# description: Starts celeryd
#
# @author Jeremy Orem <oremj@mozilla.com>
# @author Dave Dash <dd@mozilla.com>
#
DJANGO_PROJECT_DIR=/data/amo_python/www/preview/zamboni