Skip to content

Instantly share code, notes, and snippets.

View ianjsikes's full-sized avatar

Ian J Sikes ianjsikes

View GitHub Profile
  • 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

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 October 7, 2020 23:40
A Node.js script to convert Giffyglyph's Monster Maker JSON into Roll20 JSON to be imported using VTTES
#! /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 September 21, 2020 15:49
Unofficial Roll20 import script for GiffyGlyph's Monster Maker
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 July 9, 2020 02:47
A Roll20 API script for Paranoia 2017, including character creation wizard and NODE dice roller.
/**
* 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);
class CommandParser {
constructor(trigger) {
this.trigger = trigger;
this.defaultCmd;
this.subCmds = {};
}
default(action) {
this.defaultCmd = { action };
return this;
@ianjsikes
ianjsikes / yarg.fish
Created July 24, 2019 19:24
Fish shell script to interactively find and run a script in your package.json
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 June 21, 2019 23:02
Research notes for a crash reporting solution for React Native.

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.

function keep-running
while not eval $argv
echo "Rerunning..."
echo (date)
end
end
@ianjsikes
ianjsikes / dedup.sh
Created May 3, 2019 20:34
Deduplicates entries in an input JSON Lines file by the 'sellerId' property.
#!/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