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
/*! jQuery v3.2.1 | (c) JS Foundation and other contributors | jquery.org/license */ | |
!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,n=m.call(Object),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 f.call(this)},get:function(a){return null==a?f.call(this):a<0?this[a+this.length]:this[a]},pushStack:function(a){var b=r.merge(this.construc |
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
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" | |
else | |
scutil --nc start "$VPN" --secret vpn # this 'secret' is depended of your environment. | |
fi | |
fi |
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
const wait = time => new Promise(resolve => setTimeout(resolve, time)) | |
const x = (...args) => { | |
console.log('-----------------------------') | |
console.log(...args) | |
} | |
wait(1000) | |
.then(() => fetch('https://www.google.co.jp', { header: "same-origin" })) | |
.then(response => response.text()) | |
.then(text => x('this is the response', text)) |
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
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'); | |
} |
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
# python toAnki.py /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) |
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
import argparse | |
parser = argparse.ArgumentParser() | |
parser.add_argument("filename", help="You set here files to parse.") | |
parser.add_argument( | |
"--transpose", | |
default=False, action='store_true', | |
help="Exchange column header and row header." | |
) | |
args = parser.parse_args() |
This file has been truncated, but you can view the full file.
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
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 | |
ioctl(0x2, 0x4004667A, 0x7FFEEDFE39D4) = -1 Err#25 |
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
class Color: | |
def __init__(self, red, green, blue): | |
self.red = red | |
self.green = green | |
self.blue = blue | |
def __add__(self, other): | |
return Color( | |
self.red + other.red, | |
self.green + other.green, |
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
{ | |
// Use IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "clang++ - Build and debug active file", | |
"type": "cppdbg", | |
"request": "launch", |
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
$ ln -s /usr/local/Cellar/[email protected]/3.10.1/Frameworks/Python.framework/Versions/3.10/include/python3.10/* /usr/local/include | |
$ which gj | |
gj: aliased to /usr/local/Cellar/gcc/11.2.0_3/bin/g++-11 -D GLIBCXX_DEBUG -Wl,-demangle -std=c++17 -Wall -Werror -fsanitize=undefined -O2 -g | |
$ which aa | |
aa () { | |
if [[ -z $1 ]] | |
then | |
./a.out | |
else |
OlderNewer