Skip to content

Instantly share code, notes, and snippets.

/**
* Use log4j in a groovy script, with configuration from a groovy like config file
*
* As asked in this
* <a href="http://stackoverflow.com/questions/19868180/groovy-script-and-log4j">stackoverflow question - groovy-script-and-log4j</a>
*
*
* Tested with Java 7, Groovy 2.1.9
* User: kon
* Date: 9/11/13
<div ng-app="wizardApp">
<div ng-controller="WizardSignupController">
<h2>Signup wizard</h2>
<div ui-view></div>
</div>
</div>
<script type="text/javascript" src="/js/vendor/angular-ui-router/release/angular-ui-router.min.js"></script>
<script type="text/javascript">
angular.module('wizardApp', [
'ui.router',
var gulp = require('gulp');
var gutil = require('gulp-util');
var shell = require('gulp-shell');
var git = require('gulp-git');
var docco = require('gulp-docco');
var cache = require('gulp-cached');
var remember = require('gulp-remember');
// Docs Task
#!/usr/bin/env python
# Author: http://icephoenix.us/notes-for-myself/auto-splitting-video-file-in-equal-chunks-with-ffmpeg-and-python/
import subprocess
import re
import math
from optparse import OptionParser
length_regexp = 'Duration: (\d{2}):(\d{2}):(\d{2})\.\d+,'
$ cd Watcher/
Start the script,
$ sudo python watcher.py start
This will create a .watcher dirctory at /home/ubuntu
Now,
$ sudo python watcher.py stop
Goto the .watcher directory created and
set the destination to be watched for and action to be undertaken
in jobs.yml ie. watch: and command:
@dreadjr
dreadjr / script
Created April 8, 2014 19:27 — forked from uzicorp/script
#!/bin/sh
curl -XDELETE http://localhost:9200/shinglephrase
curl -XPOST http://localhost:9200/shinglephrase/ -d '
{
"settings":{
"index":{
"number_of_shards":5,
"number_of_replicas":1
[
"2013-08-12T20:34:43.243Z",
"2013-08-12T20:34:43.244Z",
"2013-08-12T20:34:43.245Z",
"2013-08-12T20:34:45.047Z"
]
[
{"id":"info","level":"info","message":"Testing logger","timestamp":"2013-08-12T20:34:43.243Z"},
{"id":"warn","level":"warn","message":"Testing logger","timestamp":"2013-08-12T20:34:43.244Z"},
{"id":"error","level":"error","message":"Testing logger","timestamp":"2013-08-12T20:34:43.245Z"},
{"level":"info","message":"server listening at http://0.0.0.0:8787","timestamp":"2013-08-12T20:34:45.047Z"}
]
{"id":"info","level":"info","message":"Testing logger","timestamp":"2013-08-12T20:34:43.243Z"}
{"id":"warn","level":"warn","message":"Testing logger","timestamp":"2013-08-12T20:34:43.244Z"}
{"id":"error","level":"error","message":"Testing logger","timestamp":"2013-08-12T20:34:43.245Z"}
{"level":"info","message":"server listening at http://0.0.0.0:8787","timestamp":"2013-08-12T20:34:45.047Z"}
@dreadjr
dreadjr / gist:5490354
Created April 30, 2013 17:32
look for orphaned package.json node.js packages
grep -R "{package}" --include "*.js" --exclude-dir "node_modules" .