Skip to content

Instantly share code, notes, and snippets.

View hourback's full-sized avatar

Ali Jonathan Nabavi hourback

View GitHub Profile
@hourback
hourback / create_data_volume_container.sh
Created September 4, 2014 19:39
This creates a data volume container
docker run -v /data --name my-data busybox true
@hourback
hourback / start_samba.sh
Last active August 29, 2015 14:06
This is what I'm using on boot2docker to share a data volume container via Samba
docker run --rm -v /usr/local/bin/docker:/docker -v /var/run/docker.sock:/docker.sock svendowideit/samba my-data
@hourback
hourback / logstash.conf
Last active August 29, 2015 14:06
logstash.conf for pblittle/docker-logstash
input {
stdin {
type => "stdin-type"
}
file {
type => "syslog"
path => [ "/var/log/*.log", "/var/log/messages", "/var/log/syslog" ]
start_position => "beginning"
}
@hourback
hourback / The instructions
Last active August 29, 2015 14:01
From the JUGGLING ASYNC lesson on http://nodeschool.io/#learn-you-node
LEARN YOU THE NODE.JS FOR MUCH WIN!
─────────────────────────────────────
JUGGLING ASYNC
Exercise 9 of 13
This problem is the same as the previous problem (HTTP COLLECT) in that you need to use http.get(). However, this time you will be provided with three URLs as the first three command-line arguments.
You must collect the complete content provided to you by each of the URLs and print it to the console (stdout). You don't need to print out the length, just the data as a String; one line per URL. The catch is that you must print them out in the same order as the URLs are provided to you as command-line arguments.
-------------------------------------------------------------------------------
anab@osidev-ws23:/storage/opt/android-sdk-linux/platform-tools$ cat recovery.log
Starting TWRP 2.3.1.0 on Tue Nov 6 16:33:13 2012
I:Internal path defined: '/sdcard'
I:External path defined: '/sdcard2'
Starting the UI...Pixel format: 720x1280 @ 32bpp
Pixel format: BGR_565
framebuffer: fd 3 (720 x 1280)
=> Linking mtab
=> Processing recovery.fstab
I:Processing '/boot'
@hourback
hourback / gist:3136792
Created July 18, 2012 15:14
Failing tests
anab@osidev-ws23:~/Dropbox/projects/tnt_testing/ringojs$ ringo test.js
================================================================================
+ Running test AssertionError instanceof Error ... PASSED (17 ms)
+ Running test ok false ... PASSED (3 ms)
+ Running test ok(true) ... PASSED (0 ms)
+ Running test ok("test") ... PASSED (0 ms)
+ Running test equal true false ... PASSED (2 ms)
+ Running test equal null null ... PASSED (0 ms)
+ Running test equal undefined undefined ... PASSED (0 ms)
+ Running test equal null undefined ... PASSED (0 ms)
@hourback
hourback / tnt.js
Created July 17, 2012 19:24
RingoJS & Selenium
importPackage(org.openqa.selenium.firefox.FirefoxDriver);
var driver = new FirefoxDriver();
driver.get("http://www.google.com");
@hourback
hourback / solr_index.js
Created July 9, 2012 19:46
Handling XML output from Solr
var http = require('http-get');
var parser = require('libxml-to-js');
var util = require('util');
var options = {url: 'http://localhost:8080/solr/core1/dataimportdevelopment?command=status'};
var obj = (function(){
var mycallback = function (error, result) {
var xml = "";