Skip to content

Instantly share code, notes, and snippets.

haͣrͬukaͣreͤrͬu harukaeru

Block or report user

Report or block harukaeru

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:ae5dfa9a0916edbd013ae2ae08baa4ed
This file has been truncated, but you can view the full file.
SYSCALL(args) = return
dtrace: 592513 dynamic variable drops with non-empty dirty list
open("/dev/dtracehelper\0", 0x2, 0xFFFFFFFFEDFE5070) = 3 0
ioctl(0x3, 0x80086804, 0x7FFEEDFE4E80) = 0 0
close(0x3) = 0 0
access("/AppleInternal/XBS/.isChrooted\0", 0x0, 0x0) = -1 Err#2
bsdthread_register(0x7FFF79A40408, 0x7FFF79A403F8, 0x2000) = 1073742047 0
sysctlbyname(kern.bootargs, 0xD, 0x7FFEEDFE4220, 0x7FFEEDFE4218, 0x0) = 0 0
issetugid(0x0, 0x0, 0x0) = 0 0
harukaeru /
Created Nov 8, 2018
Create a table from linear texts which contain columns and rows
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("filename", help="You set here files to parse.")
default=False, action='store_true',
help="Exchange column header and row header."
args = parser.parse_args()
harukaeru /
Created Nov 4, 2018
Assemble data for Anki from normalized TSV file specialized in Weblio.
# python /path/to/your_tsv_file.tsv
import re
import sys
alphabet = r'[A-Za-z ,\.\[\]"\']'
alphabet = re.compile(alphabet)
quotation = r'- .*$'
quotation = re.compile(quotation)
harukaeru / extract.js
Created Nov 4, 2018
Extract data as TSV from glossary in Weblio
View extract.js
var tdFunctions = {
0: td => td.getAttribute('title'),
1: td => td.innerHTML,
2: td => td.querySelector('.tngMainTIML').innerHTML,
3: td => td.querySelector('.tngMainTSRHB').textContent,
var trFilter = tr => {
return tr.classList.contains('tngMainTrOn');
View foo.js
const wait = time => new Promise(resolve => setTimeout(resolve, time))
const x = (...args) => {
.then(() => fetch('', { header: "same-origin" }))
.then(response => response.text())
.then(text => x('this is the response', text))
harukaeru /
Last active Oct 17, 2017
Connect to VPN on Mac OS X (10.13)
current_network_name=$(/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I | awk '/ SSID/ {print substr($0, index($0, $2))}')
if [ $current_network_name == "ICHINEN-PC_Network" ]; then # You should replace this Network name with your own.
VPN="8EEFE99B-582D-4E3E-B08B-F40030C4BB39" # You can get this VPN name from "scutil --nc list"
if scutil --nc status "$VPN" | grep -q Connected; then
scutil --nc stop "$VPN"
scutil --nc start "$VPN" --secret vpn # this 'secret' is depended of your environment.
harukaeru / coverall_github.js
Last active Sep 14, 2017
You can directly access to a page of code coverage in Coveralls from GitHub Pull Request Page.
View coverall_github.js
/*! jQuery v3.2.1 | (c) JS Foundation and other contributors | */
!function(a,b){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){"use strict";var c=[],d=a.document,e=Object.getPrototypeOf,f=c.slice,g=c.concat,h=c.push,i=c.indexOf,j={},k=j.toString,l=j.hasOwnProperty,m=l.toString,,o={};function p(a,b){b=b||d;var c=b.createElement("script");c.text=a,b.head.appendChild(c).parentNode.removeChild(c)}var q="3.2.1",r=function(a,b){return new r.fn.init(a,b)},s=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,t=/^-ms-/,u=/-([a-z])/g,v=function(a,b){return b.toUpperCase()};r.fn=r.prototype={jquery:q,constructor:r,length:0,toArray:function(){return},get:function(a){return null==a?<0?this[a+this.length]:this[a]},pushStack:function(a){var b=r.merge(this.construc
You can’t perform that action at this time.