Skip to content

Instantly share code, notes, and snippets.

@shyiko
shyiko / shell.script.template.in.coffee
Created July 22, 2013 20:29
Template of shell script in CoffeScript
#!/usr/bin/env coffee
###
prerequisites;
$ sudo apt-get install nodejs # whatever
$ sudo npm install -g coffee-script
###
bootstrap = do ->
exec = require('child_process').exec
@shyiko
shyiko / pom.xml
Created July 27, 2013 19:33
shyiko/servers-maven-extension inquiry (#1)
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>land.of.ooo</groupId>
<artifactId>adventure_time</artifactId>
<version>0.1.0-SNAPSHOT</version>
@shyiko
shyiko / 6746525-gradle-based-project.zip
Last active December 24, 2015 04:49
(WebStorm 7.0) TODO highlighting fix for CoffeeScript plugin
@shyiko
shyiko / vagrantfile
Created May 8, 2014 08:24
mysql-5.0.95-sandbox
Vagrant.configure("2") do |config|
config.vm.box = 'lucid32'
config.vm.box_url = 'http://files.vagrantup.com/lucid32.box'
config.vm.provision :shell, :inline => %Q(
apt-get update && apt-get install -y make libaio1 # libaio1 required by mysql
echo 'Downloading MySQL distribution ...'
wget --progress=dot:mega --content-disposition \
http://mirror.cogentco.com/pub/mysql/MySQL-5.0/mysql-5.0.95-linux-i686-glibc23.tar.gz \
2>&1 | grep --line-buffered -o '[0-9]*%'
wget -O - https://launchpad.net/mysql-sandbox/mysql-sandbox-3/mysql-sandbox-3/+download/MySQL-Sandbox-3.0.33.tar.gz | tar xzv
@shyiko
shyiko / grep.js
Created May 18, 2014 12:57
Monkey patch bringing Mocha's --grep and --invert to Cucumber.js
function unquote(value) {
return /^'.*'|".*"$/.test(value) ? value.slice(1, -1) : value;
}
module.exports = function (options) {
process.argv.reduce(function (obj, value) {
var groups = /^--(\w+)(?::(.+))?$/.exec(value);
if (groups !== null) {
obj[groups[1]] = unquote(groups[2] || '');
@shyiko
shyiko / gist:b67e160a09dbc42d1d67
Created October 13, 2014 11:10
justniffer squeeze installation
wget http://ftp.jaist.ac.jp/pub/sourceforge/j/project/ju/justniffer/justniffer/justniffer%200.5.11/justniffer_0.5.11.tar.gz
tar -xzf justniffer_0.5.11.tar.gz
cd justniffer-0.5.11
apt-get install make
apt-get install gcc
apt-get install g++
apt-get install libc6
apt-get install libboost-dev
apt-get install libboost-regex-dev
apt-get install libboost-iostreams-dev
@shyiko
shyiko / hg-to-git.sh
Last active August 29, 2015 14:22
`hg` to `git` one-liner
#!/bin/bash
CHECKOUT_DIR=$PWD
if [ ! -d /tmp/fast-export.da7f34caf5629d283761 ]; then
git clone https://github.com/frej/fast-export /tmp/fast-export
(cd /tmp/fast-export && git reset --hard d202200fd9da)
cat >/tmp/fast-export.patch<<-EOF
diff --git a/hg2git.py b/hg2git.py
index c58cade..4abcbc2 100755
--- a/hg2git.py
+++ b/hg2git.py
@shyiko
shyiko / .editorconfig
Created June 27, 2015 23:54
docker-armv7-redis-image
# http://editorconfig.org
root = true
[*]
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
@shyiko
shyiko / .editorconfig
Created June 27, 2015 23:59
docker-armv7-archlinux-image
# http://editorconfig.org
root = true
[*]
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true