This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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+,' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Artie - Artie Server | |
# | |
# Real-time messaging service | |
description "artie" | |
start on filesystem | |
stop on runlevel S | |
respawn |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add-apt-repository ppa:cwchien/gradle | |
apt-get update | |
apt-get install gradle |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Check java version | |
JAVA_VER=$(java -version 2>&1 | sed 's/java version "\(.*\)\.\(.*\)\..*"/\1\2/; 1q') | |
if [ "$JAVA_VER" -lt 18 ] | |
then | |
# Download jdk 8 | |
echo "Downloading and installing jdk 8" | |
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8-b132/jdk-8-linux-x64.rpm" | |
# Silent install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
################### | |
#configuration here | |
#################### | |
bucketname="your_bucket_name" | |
########################## | |
cd /home/hadoop | |
#first we set two vars...I had errors without this | |
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH | |
export LD_RUN_PATH=/usr/local/lib:$LD_RUN_PATH |
OlderNewer