Skip to content

Instantly share code, notes, and snippets.

Avatar

Ian J Sikes ianjsikes

View GitHub Profile
View build-system-overview.md
  • Make a native change to begin

  • CircleCI

    • Check Native diff
    • Trigger native build
      • App center API
      • POST to backend
  • Backend

    • Handle "create build" post
  • Github "notify" initial

View advent2020day4.rs
use std::{collections::HashSet, i64, io};
const INPUT: &'static str = include_str!("../input.txt");
fn main() -> io::Result<()> {
let mut valid_count_one = 0;
let mut valid_count_two = 0;
for passport in INPUT.split("\n\n") {
if is_valid_one(passport) {
valid_count_one += 1;
@ianjsikes
ianjsikes / GGMM-node.js
Last active Oct 7, 2020
A Node.js script to convert Giffyglyph's Monster Maker JSON into Roll20 JSON to be imported using VTTES
View GGMM-node.js
#! /usr/bin/env node
//@ts-check
/** @returns {string} */
const generateUUID = (function () {
'use strict'
var a = 0,
b = []
return function () {
@ianjsikes
ianjsikes / GGMM.js
Last active Sep 21, 2020
Unofficial Roll20 import script for GiffyGlyph's Monster Maker
View GGMM.js
class _Slo {
version = "0.2.1";
randomId = () =>
Math.random().toString(36).substring(2, 15) +
Math.random().toString(36).substring(2, 15);
who = (name) => name.replace(/\(GM\)/, "").trim();
whisper = (from, to, msg) => sendChat(from, `/w "${this.who(to)}" ${msg}`);
@ianjsikes
ianjsikes / FriendComputer.js
Created Jul 9, 2020
A Roll20 API script for Paranoia 2017, including character creation wizard and NODE dice roller.
View FriendComputer.js
/**
* SLO_UTILS
* Copied from SloUtils.js
*/
class _Slo {
version = '0.2.1';
randomId = () =>
Math.random().toString(36).substring(2, 15) +
Math.random().toString(36).substring(2, 15);
View ScriptBase.js
class CommandParser {
constructor(trigger) {
this.trigger = trigger;
this.defaultCmd;
this.subCmds = {};
}
default(action) {
this.defaultCmd = { action };
return this;
@ianjsikes
ianjsikes / yarg.fish
Created Jul 24, 2019
Fish shell script to interactively find and run a script in your package.json
View yarg.fish
function yarg -d "Interactively choose a script to `yarn run`"
if not test -e ./package.json
echo "No package.json found in current directory"
return 1
end
if not type -q yarn; and not type -q npm
echo "You must have yarn or npm installed"
return 1
end
@ianjsikes
ianjsikes / rn-crash-reporting-notes.md
Last active Jun 21, 2019
Research notes for a crash reporting solution for React Native.
View rn-crash-reporting-notes.md

React Native Crash Reporting Research

Here are some notes from my research with crash reporting tools for React Native. I may be a little biased towards Sentry because it is what I've used in the past. Note: I am ONLY considering services that are major players and used by well-known companies.


Firebase

Firebase is Google's all-in-one suite of tools including analytics, push notifications, A/B testing, crash reporting, deep linking, etc.

View keep-running.fish
function keep-running
while not eval $argv
echo "Rerunning..."
echo (date)
end
end
@ianjsikes
ianjsikes / dedup.sh
Created May 3, 2019
Deduplicates entries in an input JSON Lines file by the 'sellerId' property.
View dedup.sh
#!/bin/bash
in_file=$1
out_file=$2
if [ "$#" -ne 2 ]; then
if [ "$#" -ne 1 ]; then
echo "You must provide at least one file path as an argument."
echo "Usage: dedup <input_path> [output_path]"
echo "If output_path is ommitted, input file will be overwritten with output."
exit 1