Skip to content

Instantly share code, notes, and snippets.

@retronym
retronym / mvn2sbt.scala
Created May 3, 2010 17:17
mvn2sbt: quick hack to turn <dependencies> into SBT
object scala {
val version = "SCALA_VERSION$"
}
val xml = <dependencies>
<dependency>
<groupId>org.scalanlp</groupId>
<artifactId>scalala_${scala.version}</artifactId>
<version>0.3.1</version>
</dependency>
@jeantil
jeantil / .Xdefault
Created August 13, 2010 16:52
cygwin config on windows with rxvt native
! rxvt-cygwin-native .Xdefault with sane colors
#ifdef COLOR
*customization: -color
#endif
! GVim colors, etc
!! GTK versions of gvim will not use all these.
Vim*useSchemes: all
Vim*sgiMode: true
@raymyers
raymyers / gradle-wrapper.xml
Created December 10, 2010 04:30
Example of calling Gradle from Ant
<project name="gradle-wrapper" default="" basedir=".">
<description>
</description>
<!-- set global properties for this build -->
<property environment="env" />
<property name="gradle.executable" location="${env.GRADLE_HOME}/bin/gradle" />
<target name="jar">
<exec executable="${gradle.executable}" dir=".">
<arg value="jar" />
@geemus
geemus / fog_virtualbox.rb
Created March 14, 2011 21:08
simple example of using virtualbox
require 'fog'
compute = Fog::Compute.new(:provider => 'VirtualBox')
server = compute.servers.create(:name => 'lucid', :os => 'Ubuntu')
medium = compute.mediums.create(:device_type => :hard_disk, :location => '/Users/geemus/geemus/virtualbox_poc/lucid.vmdk', :read_only => false)
storage_controller = server.storage_controllers.create(:bus => :sata, :name => 'sata')
storage_controller.attach(medium, 0)
@jeremyBanks
jeremyBanks / cover.jpg
Created May 15, 2011 14:01
FanFiction.net Audiobook Generator
cover.jpg
@Khedi
Khedi / FinalSevens
Created June 3, 2011 19:16
Python Tetris-like numbers game using pygame
#Final Sevens
#6/5/2011
#Blocks already in curTiles that fall down don't trigger the scoring.
#Of the spawning blocks, 3 is overused. Maybe add in 4's and 5's
import pygame, sys, random, time
from pygame.locals import *
pygame.init()
gameClock = pygame.time.Clock()
package org.behrang.deliciouscleaner
@Grab(group = "net.sf.delicious-java", module = "delicious", version = "1.14")
import del.icio.us.Delicious
def d = new Delicious("username", "password")
def posts = d.allPosts
posts.eachWithIndex { p, i ->
println (i+1) + "/" + posts.size()
@chbaranowski
chbaranowski / GoogleDemoTest.java
Created June 5, 2011 14:49
Sikuli JUnit Demo Test
import org.junit.Test;
import org.sikuli.script.App;
import org.sikuli.script.Screen;
public class GoogleDemoTest {
@Test
public void testGoogleSearch() throws Exception {
Screen screen = new Screen();
App app = new App("Firefox 4.app");
@atomicules
atomicules / Smile.coffee
Last active September 26, 2015 06:27
Coffeescript source code for a bookmarklet to generate QIF files for SMILE bank.
#Bookmarklet to generate QIF for Recent Item and Previous Statement pages on SMILE.co.uk bank
#Will (try to) open a new popup window where you will have to either:
#a) Copy text from and paste to text editor (Chrome)
#b) Save the page as a text file (Firefox)
#
#Written in Coffescript, but just use http://javascriptcompressor.com/ to compress the
#compiled javascript so you have a bookmarklet.
data = document.getElementsByClassName("summaryTable")[0].children[1].children
@nateps
nateps / gist:1172490
Created August 26, 2011 01:38
Hide the address bar in a fullscreen iPhone or Android web app
<!DOCTYPE html>
<meta charset=utf-8>
<meta name=viewport content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name=apple-mobile-web-app-capable content=yes>
<meta name=apple-mobile-web-app-status-bar-style content=black>
<title>Test fullscreen</title>
<style>
html, body {
margin: 0;
padding: 0;