Skip to content

Instantly share code, notes, and snippets.

View cunneen's full-sized avatar

Mike Cunneen cunneen

  • Perth, Australia
View GitHub Profile
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@cunneen
cunneen / keybase.md
Created June 30, 2023 04:08
keybase.md

Keybase proof

I hereby claim:

  • I am cunneen on github.
  • I am cunneen (https://keybase.io/cunneen) on keybase.
  • I have a public key ASD2B9N4HIcB5mADJrgE9B3tBOEuBAdXxUo_0pjDUWo2UQo

To claim this, I am signing this object:

@cunneen
cunneen / machine.js
Created June 23, 2021 03:28
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@cunneen
cunneen / machine.js
Last active June 15, 2021 14:42
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@cunneen
cunneen / getHashedPassword.js
Created April 12, 2021 09:36
Meteor Password Hashing
// Based on https://forums.meteor.com/t/accounts-password-in-nodejs/45154
const prompts = require('prompts');
const hashPassword = require('./meteorpass')
let pass;
prompts([{
type: 'password',
name: 'password',
message: 'Enter plaintext password',
@cunneen
cunneen / create-new-react-native-project.sh
Last active October 19, 2021 13:49
Create a new react native app, specifying app name and package name
#!/usr/bin/env bash
# get the full path for the current dir
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
###### prompt for values
# get the new app name
read -p "Enter your new app name [Foo App]: " NEW_APP_NAME
NEW_APP_NAME=${NEW_APP_NAME:-"Foo App"}
@cunneen
cunneen / Frame android screenshots with ImageMagick.md
Last active December 27, 2021 16:36
Frame android screenshots with ImageMagick

Prerequisites

  1. A screenshot with the correct aspect ratio
  2. A device frame PNG with a transparent area where the screenshot will be placed See Facebook's Device Art
  3. GraphicsMagick / ImageMagick
  4. That's it.

Instructions

@cunneen
cunneen / makeicons.sh
Created August 13, 2018 03:03
Make a mac OS icns file from a single input file using imageMagick and iconutil
#!/usr/bin/env bash
infile=$1
if [ ! -f $infile ]; then
echo specify a filename as the first parameter.
exit 1;
fi
tempdir=$(mktemp --directory --suffix=.iconset --tmpdir=`pwd`)
@cunneen
cunneen / Readme.md
Last active June 10, 2024 08:47
Install Open GApps In Android Emulator

Introduction

This works to install Open GApps into the Android Emulator, working around the issue where the system partition is too small.

With it, I can get Google Play installing into the emulator. Tested on KitKat (API 19), Lollipop (API 21) and Oreo (API 27).

It's tested on MacOS.

Instructions

@cunneen
cunneen / replace_cordova_tarballs_with_npm.sh
Last active March 29, 2016 04:49
A very rough bash script to replace meteor cordova tarball URLs with a private NPM reference. Use together with sinopia.
#!/bin/bash
# Run this from the meteor application folder. It's assumed that the git root is somewhere
# ABOVE the meteor application folder. If your meteor application root *is* the git root,
# review this code very carefully as I've not tested it in such cases.
#
# It downloads all meteor cordova tarball and https plugins, and registers them
# with the npm registry. I use this with a private registry (sinopia).
# It then updates the meteor cordova plugin registry with a reference to the npm registry.
meteordir="`pwd`"
destfoldername="cordova-plugins"