Skip to content

Instantly share code, notes, and snippets.

brew bundle dump --file=~/Documents/Dev/dotfiles/Brewfile --force
@thirota
thirota / gist:52de45f15f5e0ea3862ada765d4be9a9
Created August 14, 2016 02:18
tcpdump for local confluence
tcpdump -X -i eth1 port 8090
@thirota
thirota / runner.groovy
Created August 12, 2016 02:51
groovy does not throw NPE when null.toString()
Object obj = null;
String s = obj.toString(); // groovy does not throw NPE
String result = "false";
if (s.equals("null")) {
result = "true";
}
return result; // "true"
@thirota
thirota / gist:b101be4f389385edc15c
Created March 29, 2016 03:49
disable sync time on virtualbox guest linux
sudo service vboxadd-service stop
// after is >, not >=
private static void testAfter() {
Date a = new Date();
//Date b = new Date(a.getTime()); // after: false
Date b = new Date(a.getTime() + 1); // after: true
System.out.println("a: " + a.getTime());
System.out.println("b: " + b.getTime());
@thirota
thirota / hoge-ui.js
Created September 12, 2015 13:21
UI module
/**
* @module hoge-ui
* @requires jQuery
*/
(function() {
"use strict";
var enableConsoleLog = true;
// TODO
@thirota
thirota / hoge-utils.js
Created September 12, 2015 13:12
Utils module
/**
* @module hoge-utils
*/
// namespace
this.hoge = this.hoge || {};
(function() {
"use strict";
@thirota
thirota / gist:29a1c8b3f80beed2c08d
Created July 25, 2015 12:16
docker run ubuntu
docker pull ubuntu:latest
docker run -it ubuntu:latest /bin/bash
@thirota
thirota / gist:87f5e167f1f9892f50ea
Created July 13, 2015 05:22
yum install tmux for centos 6.5
wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
rpm -ivh rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
yum install tmux
@thirota
thirota / gist:7b5268d2f26b0fab5abb
Last active August 29, 2015 14:24
edit and save confluence jar file
# see https://confluence.atlassian.com/display/CONFKB/How+to+Edit+Bundled+or+System+Plugins
cd /tmp
mkdir working-confluence
cd working-confluence
unzip /tmp/confluence-5.6.6.jar
edit some files...
jar cvf /tmp/confluence-5.6.6-new.jar .