Skip to content

Instantly share code, notes, and snippets.

View nihonjinrxs's full-sized avatar
💭
⚜️ Coding? Reading? ⚜️

Ryan B. Harvey nihonjinrxs

💭
⚜️ Coding? Reading? ⚜️
View GitHub Profile
@nihonjinrxs
nihonjinrxs / .colors.csv
Created August 24, 2016 17:05 — forked from avillafiorita/.colors.csv
change osx terminal colors and font from the command line
LightPink1 #ffbdc5 255 189 197 {65535 48573 50629}
pink4 #9d777f 157 119 127 {40349 30583 32639}
pink3 #d7a3ad 215 163 173 {55255 41891 44461}
pink2 #f2b9c4 242 185 196 {62194 47545 50372}
pink1 #ffc3cf 255 195 207 {65535 50115 53199}
HotPink4 #9e4f75 158 79 117 {40606 20303 30069}
HotPink3 #d878a1 216 120 161 {55512 30840 41377}
HotPink2 #f383b5 243 131 181 {62451 33667 46517}
HotPink1 #ff87c1 255 135 193 {65535 34695 49601}
DeepPink4 #9e1e62 158 30 98 {40606 7710 25186}
@nihonjinrxs
nihonjinrxs / Commands Run With Output
Last active July 4, 2017 21:53
Error running habitica in a local container with bootstrapped local clone
🗂 ~/code/ryan/habitica
🌿 [develop] $
docker run -t --volume `pwd`:/usr/src/habitrpg habitica_web npm install > ~/Desktop/npm_install_volume.log
🗂 ~/code/ryan/habitica
🌿 [develop] $
docker run -t --volume `pwd`:/usr/src/habitrpg habitica_web bower install --allow-root > ~/Desktop/bower_install_volume.log
🗂 ~/code/ryan/habitica
🌿 [develop] $
@nihonjinrxs
nihonjinrxs / open-in-bj.js
Created June 11, 2018 14:32 — forked from VinSpee/open-in-bj.js
open in bluejeans app
// ==UserScript==
// @name BlueJeans Open In App
// @namespace https://vinspee.me
// @version 0.1
// @license MIT
// @description Open BlueJeans meetings in the app
// @author Vince Speelman <v@vinspee.me>
// @match *://bluejeans.com/*
// @grant window.close
// @require https://cdn.rawgit.com/agnoster/base32-js/91f43b82f19f467ade1270aa4b0e579b201d7efd/dist/base32.min.js
@nihonjinrxs
nihonjinrxs / collapse_state_files.js
Last active December 12, 2018 07:08
Terraform AWS discovery using dtan4/terraforming
#!/usr/bin/env node
const fs = require('fs');
const path = require('path');
const deepmerge = require('deepmerge');
if (process.argv.length <= 2) {
console.log("Usage: " + __filename + " path/to/directory");
process.exit(-1);
}

VSCode install for Raspberry Pi 3B+

The following were done on a Raspberry Pi 3B+ running Raspbian Linux with the following architecture:

root@raspberrypi:/home/pi# uname -a
Linux raspberrypi 4.19.50-v7+ #896 SMP Thu Jun 20 16:11:44 BST 2019 armv7l GNU/Linux
root@raspberrypi:/home/pi# dpkg --print-architecture
armhf
@nihonjinrxs
nihonjinrxs / capture3_test.rb
Created November 5, 2019 19:52
Testing Open3.capture3 in Ruby, using array-style command syntax vs. string-style command syntax with Unix-style pipes
require 'open3'
cli_pipe_test_array = [
"echo",
'{"some": "json", "data": 345, "here": true}',
"|",
"jq",
'".data"',
"|",
"xargs",
@nihonjinrxs
nihonjinrxs / description.md
Last active April 28, 2020 07:56
chip clock emulator idea

Thoughts on writing a Gameboy chip clock emulator, with bits of C#

The math

From this article I found the Gameboy (all versions) frame rates to be 59.7275. This is calculated based on a chip that runs at 4,194,304 Hz and a frame draw rate of one frame per 70,224 clock cycles (4194304 / 70224 = 59.7275 fps). GBC doubles each of the numbers on the left side of the calculation, and GBA quadruples each, but the ratios remain the same.

Relevant methods and properties on System.Diagnostics.Stopwatch

@nihonjinrxs
nihonjinrxs / index.js
Last active April 19, 2021 05:22
segment & concat with ffmpeg via node + fessonia
/* original command:
ffmpeg -i video.mp4 -filter_complex "[0:v]trim=1:2,setpts=PTS-STARTPTS[v0]; [0:a]atrim=1:2,asetpts=PTS-STARTPTS[a0]; [0:v]trim=120:125,setpts=PTS-STARTPTS[v1]; [0:a]atrim=120:125,asetpts=PTS-STARTPTS[a1]; [v0][a0][v1][a1]concat=n=2:v=1:a=1[out]" -map "[out]" output.mp4
*/
/*
Rewrite using Fessonia library in node.js
Get Fessonia: https://www.npmjs.com/package/@tedconf/fessonia
Fessonia Docs: https://tedconf.github.io/fessonia/
*/
@nihonjinrxs
nihonjinrxs / index.js
Last active November 12, 2020 08:34
Who's in space?
const got = require('got');
const SPACE_URI = 'http://api.open-notify.org/astros.json';
async function getPeople() {
try {
const { body } = await got(
SPACE_URI,
{ headers: { Accept: 'application/json' } }
)
return JSON.parse(body);