Skip to content

Instantly share code, notes, and snippets.

View shiroyuki's full-sized avatar
🇨🇦
Working

Juti Noppornpitak shiroyuki

🇨🇦
Working
View GitHub Profile
@shiroyuki
shiroyuki / data_mapping_sample.py
Created January 7, 2019 19:48
Data mapping sample
# models.py
from dataclasses import dataclass # Built-in in Python 3.6
@dataclass
class Bar:
x: int
y: float
@dataclass
@shiroyuki
shiroyuki / youtube-nuke-option.js
Last active November 7, 2017 04:22
Youtube "Watch Later" Nuclear Button
function triggerReload() {
let loadMoreButton = document.querySelector('button.load-more-button');
if (!loadMoreButton) {
console.error('Unable to find the "load more" button.');
return false;
}
console.log('Trigger the reload.');
@shiroyuki
shiroyuki / setup.sh
Created February 8, 2016 05:55
Install & fixing Numpy for Alpine Linux (Python 3.5+)
pip install cython
apk add musl-dev
#apk add linux-headers
@shiroyuki
shiroyuki / speed_test.sh
Created December 3, 2015 20:29
The script to test the disk speed (I/O)
# https://www.thomas-krenn.com/en/wiki/Linux_I/O_Performance_Tests_using_dd
dd if=/dev/zero of=`pwd`/testfile bs=1G count=1 oflag=direct && rm `pwd`/testfile
http://www.telegraph.co.uk/technology/apple/11988396/Jony-Ive-interview-The-story-of-the-Apple-Pencil.html
@shiroyuki
shiroyuki / disk_usage.sh
Created October 15, 2015 17:50
The script to check the disk usage
#!/bin/bash
du --max-depth=1 2> /dev/null | sort -n -r | head -n20
@shiroyuki
shiroyuki / tori-go-patch-20150920.diff
Last active September 21, 2015 15:15
A work-in-progress patch on supporting multiple results to deal with FindAllStringSubmatches.
diff --git a/re/re.go b/re/re.go
index d438921..a2e8f39 100644
--- a/re/re.go
+++ b/re/re.go
@@ -1,46 +1,46 @@
// Package re provides a simplified Regular Expression class
package re
-import "fmt" // for debugging
+//import "fmt" // for debugging
@shiroyuki
shiroyuki / php7-install.sh
Created September 16, 2015 14:20
PHP 7 Installation (Compilation Path)
./configure --with-openssl --enable-mbstring --enable-phar --with-mysqli --with-pdo-mysql \
&& make \
&& make install
@shiroyuki
shiroyuki / gist:e0befa9ddc0a2e0523f0
Created July 11, 2014 03:53
2014.07.10 - WHOIS on tv-player.us
Domain Name: TV-PLAYER.US
Domain ID: D45653297-US
Sponsoring Registrar: eNom, Inc.
Sponsoring Registrar IANA ID: 48
Registrar URL (registration services): whois.enom.com
Domain Status: clientTransferProhibited
Registrant ID: D8D3528623A092F7
Registrant Name: shi jian
Registrant Address1: Fujian
@shiroyuki
shiroyuki / gist:9129642
Created February 21, 2014 06:12
PIP error on external download
$ sudo pip install kotoba
Downloading/unpacking kotoba
You are installing an externally hosted file. Future versions of pip will default to disallowing externally hosted files.
You are installing a potentially insecure and unverifiable file. Future versions of pip will default to disallowing insecure files.
Downloading kotoba-3.0.1.tar.gz
Running setup.py egg_info for package kotoba
Installing collected packages: kotoba
Running setup.py install for kotoba