Skip to content

Instantly share code, notes, and snippets.

View matthamil's full-sized avatar
🐈

Matt Hamil matthamil

🐈
View GitHub Profile
MOBILE_PROJECT_DIR=~/path/to/project/dir
function adbreverse {
adb reverse tcp:8081 tcp:8081
}
# android only
function darkmodeoff {
adb shell "cmd uimode night no"
}
@matthamil
matthamil / unfucktime.sh
Created September 12, 2022 15:35
Resync android emulator time with current time
#!/usr/bin/env bash
adb -e shell su root date `date +"%m%d%H%M%y"`
# or if you want an alias for your .zshrc or .bashrc
# unfucktime() {
# adb -e shell su root date `date +"%m%d%H%M%y"`
# }
@matthamil
matthamil / sync_wow_addons.md
Last active December 10, 2022 21:41
Syncing WoW Addons across multiple computers

If you play WoW on multiple computers and have addons installed on one of them, you probably wish you could have the same addons installed on all of your machines. This is a guide to sync addons across multiple machines (and preserve their settings, too!).

Prerequisites

You will need the following:

  1. Google Account
  2. Google Drive storage space equal or greater than the size of your World of Warcraft\_classic_\Interface\AddOns directory.
  3. Addons you have already downloaded in your World of Warcraft\_classic_\Interface\AddOns directory.
@matthamil
matthamil / machine.js
Last active September 18, 2019 18:27
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@matthamil
matthamil / README.md
Last active December 14, 2018 15:34
Cool Dev Things I dont want to bookmark but want to keep
call plug#begin('~/.vim/plugged')
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
Plug 'w0rp/ale'
Plug 'pangloss/vim-javascript'
Plug 'tpope/vim-fugitive'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'sheerun/vim-polyglot'
Plug 'elzr/vim-json'
import * as React from 'react';
import MyFavoriteMoviesFetcher from './MyFavoriteMoviesFetcher';
import FavoriteButton from './FavoriteButton';
// MovieList has access to props passed to it.
// It also has access to favoriteMovies and viewingStats, which are values calculated from the redux store.
// It can pinpoint exactly which children/nested children need these props.
// You no longer need to pass props from parent to child to child to child. You can target the level that needs the props.
const MovieList = (props) => (
<MyFavoriteMoviesFetcher>
/**
* Scheduling events and goals is a core feature of our platform.
* Users should be able to set goals to complete for themselves.
* The purpose of setting goals is to keep the user motivated and help
* them to stay clean.
*
* Users can set goals for themselves that repeat multiple times a week.
* Below is an example goal from the API. Bryan created a goal for himself
* to meditate three times a week on Mondays, Wednesdays, and Fridays.
*
@matthamil
matthamil / actions.js
Created October 5, 2017 21:02 — forked from jtibbertsma/actions.js
react-native-navigation redux middleware example
import { createAction } from 'redux-actions';
import {
NAVIGATION_PUSH,
NAVIGATION_POP,
NAVIGATION_RESET_TO,
NAVIGATION_POP_TO_ROOT
} from './actions';
export const push = createAction(NAVIGATION_PUSH);
export const pop = createAction(NAVIGATION_POP);
@matthamil
matthamil / babel_the_new_jquery.md
Last active September 22, 2017 04:39
NashJS Talk - October 2017

Babel, the new jQuery

As JavaScript developers, we always want to get our hands on the latest hotness. Luckily for us, the new 2016 and 2017 specifications for ECMAScript are that new hotness. The language is changing fast, and that comes with a few downsides. At our current rate of change, browser vendors struggle to implement all of the new language features. Fortunately, Babel is a tool that most of us JavaScript developers rely on to compile our ECMAScript 2015+ into browser-friendly ES5.

However, Babel is more than an ECMAScript 2015 to ES5 transformer. Babel is a compiler. We can use Babel's compiler magic to unlock a world of potential for JavaScript developers. Let's take a dive into how Babel's works internally and discuss a subset of computer science that most of us don't think about every day--compilers! We'll walk through the stages of Babel, discover why ASTs are powerful, and write Babel plugins to super-charge our code. The discussion will then focus on the