Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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:4236007
Created December 7, 2012 19:53 — forked from fwitzke/robot.js
Delete Me
We couldn’t find that file to show.
public class WCC2012_23 {
Expression bestSolution = null
BigDecimal target = null
List list
enum Operation {
plus('+'), minus('-'), multiply('*'), div('/')
String symbol
@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)
package com.deluan.grails.util
import java.text.SimpleDateFormat
import com.grailsrocks.cacheheaders.DateFormatterThreadLocal
/**
* This class is used to force CacheHeadersService (from the cache-headers
* plugin) to generate http-dates in english. It MUST be used when the
* locale of your server is not English.
* <p/>
@deluan
deluan / UtilFilters.groovy
Created December 17, 2010 11:52
Grails request profiling example
class UtilFilters {
def filters = {
profiler(controller: '*', action: '*') {
before = {
request._timeBeforeRequest = System.currentTimeMillis()
}
after = {
@deluan
deluan / griffon.sh
Created October 31, 2010 03:06
Script for selecting and calling the correct Griffon version when you have more than one version installed
#!/bin/sh
# Author: Deluan (http://techbeats.deluan.com)
# Check if GRIFFON_HOME is set
if [ -z "$GRIFFON_HOME" -o ! -d "$GRIFFON_HOME" ]; then
echo "Error: GRIFFON_HOME not set"
exit 2
fi
# Extract the default version and base path from GRIFFON_HOME
@deluan
deluan / dependency_pom.xml
Last active October 5, 2016 15:02
Adding shiro-faces taglib to your maven project
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-faces</artifactId>
<!-- See the latest version on the project's homepage -->
<version>2.0</version>
</dependency>