Skip to content

Instantly share code, notes, and snippets.

# This options file will have your get_iplayer (linuxcentre.net) running smoothly on mac os x, outputting iTunes friendly m4v files (provided you install the binaries as explained below)
# Usually found in ~/.get_iplayer/options
# Download and install the binaries as described on his site, but be sure to install them to /usr/local/bin (and make sure they're executable)
# $ chmod +x ffmpeg
# $ sudo mv ffmpeg /usr/local/bin/ffmpeg
# and similar for flvstreamer. lame will install there by default and mplayer is explained below (for itv downloads)
rtmpdump /usr/local/bin/flvstreamer
lame /usr/local/bin/lame
fileprefix <name> - <episode> - <pid>
@esperlu
esperlu / mysql2sqlite.sh
Created April 27, 2011 05:46
MySQL to Sqlite converter
#!/bin/sh
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the
# CREATE block and create them in separate commands _after_ all the INSERTs.
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk.
# The mysqldump file is traversed only once.
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite
@karmi
karmi / .gitignore
Created March 16, 2012 16:09
Bootstrap, install and configure ElasticSearch with Chef Solo
.DS_Store
Gemfile.lock
*.pem
node.json
tmp/*
!tmp/.gitignore
@growse
growse / iostat_to_graphite.py
Created July 19, 2012 08:07
Python port of a https://gist.github.com/915862 to send disk stats in solaris to a remote graphite server.
#!/usr/bin/python
"""
Run this with something like iostat -nx 60 2 | iostat_to_graphite.py
"""
import sys, os, re, socket, time
"""ARGF from Ruby in Python.
Released into the public domain by Andrew Gwozdziewycz, 2010
"""
@mirisuzanne
mirisuzanne / type.scss
Created September 2, 2012 17:24
Using modular scale with vertical rhythms
// Using the Modular Scale plugin along with Compass Vertical Rhythms module.
// The goal is to use MS to give us the values,
// and use VR to apply those values to our typography.
// ---------------------------------------------------------------------------
// Defaults
$base-size: 24px;
$ratio: major-third() fifth();
curl -XDELETE 'http://localhost:9200/test-idx'
echo
curl -XPUT 'http://localhost:9200/test-idx' -d '{
"mappings": {
"article": {
"properties": {
"a": {
"type": "integer"
},
"b": {
@karmi
karmi / .gitignore
Last active December 11, 2015 08:18
.DS_Store
@jbrook
jbrook / README.md
Created January 23, 2013 20:01 — forked from fnichol/README.md

orderup

Description

Creates a tarball of Chef cookbooks from a Berksfile or Cheffile for chef-solo.

Installation

Copy the program to your local machine (perhaps ~/bin?) and install Berkshelf or Librarian-Chef:

@mrflip
mrflip / 20130416-todo.md
Last active January 21, 2024 21:06
Elasticsearch Tuning Plan

Next Steps

  • Measure time spend on index, flush, refresh, merge, query, etc. (TD - done)
  • Take hot threads snapshots under read+write, read-only, write-only (TD - done)
  • Adjust refresh time to 10s (from 1s) and see how load changes (TD)
  • Measure time of a rolling restart doing disable_flush and disable_recovery (TD)
  • Specify routing on query -- make it choose same node for each shard each time (MD)
  • GC new generation size (TD)
  • Warmers
  • measure before/after of client query time with and without warmers (MD)
@killercup
killercup / Readme.md
Created February 7, 2014 18:34
Image Processing Server: Resizer and Optimizer

Image Resizer and Optimizer

Idea: grunt-contrib-imagemin as a Service

Tech Stack

  • nginx
  • luajit
  • imagemagick
  • OptiPNG, pngquant, jpegtran and gifsicle