Skip to content

Instantly share code, notes, and snippets.

@deluan
deluan / attendees2csv.groovy
Created December 11, 2011 22:09
Script to export attendees from an Facebook Event ICS (iCalendar) file to a CSV file.
#!/usr/bin/env groovy
import java.util.regex.*
def inviteFileName = args[0]
def inviteFile = new File(inviteFileName)
def pattern = Pattern.compile('^ATTENDEE;CN=(.*);PARTSTAT=ACCEPTED:(.*)')
inviteFile.eachLine { line ->
def m = pattern.matcher(line)
public class WCC2012_23 {
Expression bestSolution = null
BigDecimal target = null
List list
enum Operation {
plus('+'), minus('-'), multiply('*'), div('/')
String symbol
@deluan
deluan / gist:4236007
Created December 7, 2012 19:53 — forked from fwitzke/robot.js
Delete Me
We couldn’t find that file to show.
@deluan
deluan / gist:4237203
Created December 7, 2012 22:55 — forked from bltavares/robot.js
Delete Me
We couldn’t find that file to show.
@deluan
deluan / gist:4240301
Created December 8, 2012 13:39 — forked from apretto/robot.js
Delete Me
We couldn’t find that file to show.
@deluan
deluan / robot.js
Created December 8, 2012 15:42 — forked from kjaku/robot.js
Bubu
var Robot = function(robot) {
// var robot = ev.robot;
}
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.clone();
robot.rotateCannon(360);
robot.turn(360)
@deluan
deluan / simian-summary.rb
Last active August 29, 2015 14:09
This script processes the YML output of Simian (http://www.harukizaemon.com/simian/) and generates some useful summarized information
#!/usr/bin/env ruby
require 'yaml'
require 'pp'
if ARGV.count == 0
puts "Usage: simian-sum <simian-result.yml>"
puts
puts "Remember to remove the first 3 lines of the yml file"
exit
@deluan
deluan / bb-trigger.sh
Created March 8, 2015 05:00
Use this script for services you don't want BB to alert in red on the first failure. It will become yellow first, and then, after a configurable number of polls, it will go red. Useful with network tests over a noisy link (except when you're responsible for the link ;). Tested only with Linux. http://goo.gl/WZFwNZ
#!/bin/sh
#
# $Id: bb-trigger.sh,v 1.2 2002/01/29 18:50:17 deluan Exp $
#
# by Deluan Cotts Quintao ([email protected])
#
# Use this script for services you don't want BB to alert in red on the first error.
# It will become yellow first, and then, after a configurable number of polls, it will
# go red. Useful with network tests over a noisy link (except when you're responsible
# for the link ;)
@deluan
deluan / subsonic_upgrade.yml
Last active February 20, 2016 19:42
Upgrade Subsonic on Mac OS X
- hosts: all
gather_facts: no
vars:
- release_tag: "{{latest_release.stdout}}"
- repository: EugeneKay/subsonic
- war_name: subsonic-{{release_tag}}.war
- release_url: https://github.com/{{repository}}/releases/download/{{release_tag}}/{{war_name}}
- app_path: /Applications/Subsonic.app
- war_path: "{{app_path}}/Contents/Resources"
@deluan
deluan / extract_itunes_artwork.sh
Created March 7, 2016 15:59
Script to transform .itc files into images (JPG or PNG)
#!/bin/bash
# Script to transfort .itc files into images (JPG or PNG)
#
# .itc files are located in ~/Music/iTunes/Album Artwork
#
# This script uses (/!\ needs ) ImageMagick's convert, hexdump, printf and dd.
#
# This script might be a little slow, You might want to look at Simon Kennedy's work at http://www.sffjunkie.co.uk/python-itc.html
AlbumArtwork="${HOME}/Music/iTunes/Album Artwork"