This file contains hidden or 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
1. Partition disk, GPT/bios, 1M "boot partition", 500MB ext4 for /boot, 7.5GB ext4 for everything else. sda1/sda2/sda3 | |
2. format /dev/sda2 and /dev/sda3 as ext4 | |
3. mount drives, sda3 as root and sda2 as /boot. | |
4. pacstrap base | |
5. generate fstab | |
6. install grub package, install to /dev/sda | |
7. plus some other minor steps listed in the guide, e.g. setting locale/ntp/hostname... | |
on rebooting, grub loads correctly. However, it can't boot the system. |
This file contains hidden or 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 { EventEmitter } from 'events'; | |
class StreamTester extends EventEmitter { | |
constructor() { | |
super(); | |
this._done = false; | |
this._emitter1 = null; | |
this._emitter2 = null; |
This file contains hidden or 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
# retrieves table data | |
# kakuzuke_id = 1,2,3,4,5,6 (makuuchi, juryo, makushita, sandanme, jonidan, jonokuchi) | |
# basho_id = 585 (nov 2017) | |
# page = 1,2,3 (jonidan, sandanme and makushita have multiple pages) | |
# note: the /1/1/ at the end is 'kakuzuke_id' and 'page' - apparently you need to change both numbers | |
curl 'http://sumo.or.jp/EnHonbashoBanzuke/index_ajax/1/1/' --data 'kakuzuke_id=1&basho_id=585&page=1' | |
# for Japanese, change the base URL: | |
# http://www.sumo.or.jp/ResultBanzuke/table_ajax/1/1/ | |
curl 'http://www.sumo.or.jp/ResultBanzuke/table_ajax/1/1/' --data 'kakuzuke_id=1&basho_id=585&page=1' |
This file contains hidden or 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
# Setting DJGPP environment variables | |
set -x DJGPP_PREFIX /usr/local/djgpp | |
set -x DJGPP_CC /usr/local/djgpp/bin/i586-pc-msdosdjgpp-gcc |
This file contains hidden or 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
// calculates win percentage of makuuchi matches on sumodb. | |
// use on e.g. http://sumodb.sumogames.de/Rikishi.aspx?r=1123 where it should yield "84.9" as of now. | |
// losses by default are excluded, but wins by default are included; as is standard in sumo records. | |
$("tr").map((n, tr) => { | |
const k = $("td.cat", tr); | |
const v = $("td.val", tr); | |
if (k.text().toLowerCase().indexOf("in makuuchi") !== 2) { | |
return; | |
} | |
const r1 = v.text().split(" "); |
This file contains hidden or 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 python2 | |
''' | |
Short script to make OPL music (in DOSBox DRO files) less loud. | |
''' | |
from struct import * | |
from collections import namedtuple | |
import sys | |
import argparse | |
def namedunpack(data, names, format): |
This file contains hidden or 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
[2018-05-12 01:35:16] Debug: EasyRPG Player 0.5.3 started | |
[2018-05-12 01:35:16] Debug: ============================ | |
[2018-05-12 01:35:16] Debug: CLI: | |
[2018-05-12 01:35:16] Debug: Opened audio at 44100 Hz (stereo), format: S16LSB | |
[2018-05-12 01:35:16] Debug: Detected encoding: UTF-8 | |
[2018-05-12 01:35:16] Debug: Using /Users/msikma/Games/__/FFXAT/ as Game and Save directory | |
[2018-05-12 01:35:16] Debug: Loading game FF-XAT | |
[2018-05-12 01:35:16] Debug: Using RPG2k Interpreter | |
[2018-05-12 01:35:16] Debug: RPG2k < v1.50 / RPG2k3 < v1.05 detected | |
[2018-05-12 01:35:16] Debug: Engine configured as: 2k=1 2k3=0 2k3Legacy=0 MajorUpdated=0 Eng=0 |
This file contains hidden or 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
function check_node_project \ | |
--description 'Display project info if we changed to a Node project directory' \ | |
--on-variable dirprev | |
# Don't display project info if: | |
status --is-command-substitution; # this is command substitution \ | |
or not test -f ./package.json; # there's no package.json \ | |
or [ (count $dirprev) -lt 3 ]; # we've just opened a new Terminal session \ | |
or [ (count (string split $PWD $dirprev[-1])) -eq 2 ]; # we came from a lower directory in the hierarchy \ | |
and return |
This file contains hidden or 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
function check_node_project \ | |
--description 'Display project info if we changed to a Node project directory' \ | |
--on-variable dirprev | |
# Don't display project info if: | |
status --is-command-substitution; # this is command substitution \ | |
or not test -f ./package.json; # there's no package.json \ | |
or [ (count $dirprev) -lt 2 ]; # we've just opened a new Terminal session \ | |
# Uncomment this if you only want the project info to be shown when coming from a lower directory. | |
# or [ (count (string split $PWD $dirprev[-1])) -eq 2 ]; # we came from a lower directory in the hierarchy \ |
This file contains hidden or 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 bash | |
# This script displays the last 25 "issue branches" in order of last commit. | |
# An issue branch is a Git branch in the following format: bugfix/CMS2-123-fix-something, | |
# task/CMS2-234-new-feature, hotfix/CMS2-345-fix-crash, etc. | |
# | |
# These branches are displayed in a nice format with link to the Jira issue. | |
# Non issue branches (develop, master, etc.) are not displayed. | |
# | |
# Each issue branch line has the following format: |