This file contains 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
SHELL=/usr/bin/zsh | |
HOME=/home/jharai | |
PATH=/home/jharai/bin:/home/jharai/.rbenv/shims:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin |
This file contains 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
// ==UserScript== | |
// @name Backlog™2Markdown | |
// @namespace https://github.com/harai/ | |
// @description Convert Backlog™ notation to Markdown. | |
// @include https://*.backlog.jp/* | |
// @version 1.0.1 | |
// ==/UserScript== | |
// | |
// Copyright (C) 2015 Akihiro HARAI | |
// Originally created by edvakf |
This file contains 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
require 'securerandom' | |
INIT_CHUNK_LINES = 10000000 | |
WRITE_CHUNK_LINES = 1000000 | |
def find_smallest_pair(path) | |
files = Dir["#{path}/*"].sort_by do |f| | |
File.size(f) | |
end | |
if files.size < 2 |
This file contains 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
FROM ubuntu:14.04 | |
# | |
# Usage: | |
# docker build -t chrome . | |
# docker run -ti --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix chrome | |
# | |
# Created originally by: | |
# http://fabiorehm.com/blog/2014/09/11/running-gui-apps-with-docker/ | |
# |
This file contains 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
// ==UserScript== | |
// @name Title patch for Inbox by Gmail™ | |
// @namespace com.github.harai | |
// @description Count unread messages and display it as the page's title. | |
// @include https://inbox.google.com/* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
setInterval(function() { |
This file contains 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
# Open about:config on Firefox and set: | |
# | |
# services.sync.prefs.dangerously_allow_arbitrary true | |
# | |
sudo apt install -y git | |
ssh-keygen -f ~/.ssh/id_rsa -t rsa | |
cat ~/.ssh/id_rsa.pub | |
# Add the pubkey to BitBucket/GitHub |
This file contains 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 | |
set -e -x | |
yum -y update | |
yum -y upgrade | |
yum -y groupinstall "Development Tools" | |
yum -y install zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel openssl-devel git | |
export HOME=/home/ec2-user |
This file contains 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 python3 | |
import json | |
import glob | |
from os import path | |
def get_jsonpath(): | |
homedir = path.expanduser('~') | |
profiledirs = glob.glob('{}/.mozilla/firefox/*.default'.format(homedir)) |
This file contains 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
<?php | |
$url = 'https://downloads.wordpress.org/plugin/woocommerce.3.6.4.zip'; | |
$tmpname = tempnam("/tmp", "kawarimi"); | |
file_put_contents($tmpname, fopen($url, 'r')); | |
$zip = new ZipArchive; | |
$res = $zip->open($tmpname); | |
$zip->extractTo('./wp-content/plugins'); | |
$zip->close(); | |
exec('wp plugin activate woocommerce'); |
OlderNewer