Skip to content

Instantly share code, notes, and snippets.

miyakawataku / opennlpnote.rst
Last active Jan 25, 2021
View opennlpnote.rst
# VBoxManage guestproperty set tigermilk "/VirtualBox/GuestAdd/VBoxService/-timesync-set-threshold" 2000
env LANG=C xdg-user-dirs-gtk-update
sudo apt-get update
sudo apt-get install puppet-module-puppetlabs-apt
sudo apt-get install mercurial
miyakawataku /
Last active Aug 29, 2015
Bash function to launch WEBrick HTTP Server
#!/usr/bin/env bash
# vim: et sw=2 sts=2
# Copyright (c) 2014 Miyakawa Taku
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
View .screen_local
termcapinfo xterm* 'Co#256:pa#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm:'
termcapinfo xterm 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l'
attrcolor b ".I"
defbce "on"
miyakawataku / gist:7540259
Created Nov 19, 2013
Launch a VirtualBox VM in the headless mode.
View gist:7540259
CreateObject("WScript.Shell").Run """C:\Program Files\Oracle\VirtualBox\VBoxHeadless.exe"" -s uqbar",0
miyakawataku / google-issues-to-bitbucket.rb
Created May 28, 2013
Extracts issues of a project on Google Code, and transforms them to BitBucket issues package.
View google-issues-to-bitbucket.rb
#!/usr/bin/env ruby
# vim: et sw=2 sts=2
require 'rexml/document'
require 'open-uri'
require 'nokogiri'
require 'json'
class Issue
def initialize(entry)
miyakawataku / gist:5425774
Last active Dec 16, 2015
Cleans up Jenkins EC2 slaves which have failed to launch. Use this script as a system groovy script with Groovy Plugin.
View gist:5425774
import jenkins.model.Jenkins
import hudson.slaves.OfflineCause
for (node in Jenkins.instance.getNodes()) {
computer = node.toComputer()
if (computer.getOfflineCause() instanceof OfflineCause.LaunchFailed) {
miyakawataku / gist:5381972
Created Apr 14, 2013
find & grep from Vim commandline
View gist:5381972
command! -nargs=1 Grep call s:Grep(<f-args>)
function! s:Grep(command)
let orig_grepprg = &l:grepprg
let &l:grepprg = substitute(a:command, '|', '\\|', 'g')
let &l:grepprg = orig_grepprg
miyakawataku / omron-ups.service
Created Mar 17, 2013
Systemd .service file for auto shutdown service (SimpleShutdown) of Omron UPS. Deploy the file into /etc/systemd/system and execute following commands. # systemctl enable omron-ups.service # systemctl start omron-ups
View omron-ups.service
Description=Auto Shutdown Service (SimpleShutdown) for Omron UPS
miyakawataku /
Last active Dec 14, 2015
Overwrite a symbolic link of a directory.