Skip to content

Instantly share code, notes, and snippets.

View jonathanstiansen's full-sized avatar

Jonathan Stiansen jonathanstiansen

View GitHub Profile
@jonathanstiansen
jonathanstiansen / a_rails_rspec_checklist\README.md
Created October 20, 2021 15:01 — forked from BideoWego/a_rails_rspec_checklist\README.md
Rails Spec setup checklist, helper and support files

Rails RSpec Checklist

  • Ensure turbolinks is disabled for good measure

    • comment out gem
    • remove from javascript asset pipeline
    • remove from application layout
  • Add the following gems to Gemfile in a development, test group

    • hirb

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real

@jonathanstiansen
jonathanstiansen / machine.js
Last active August 16, 2021 18:16
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@jonathanstiansen
jonathanstiansen / machine.js
Last active February 5, 2021 23:13
Generated by XState Viz: https://xstate.js.org/viz
// import { Camera as RNCamera } from 'expo-camera'
const recordVideo = (cameraRef, options) =>
cameraRef.recordAsync(options)
// VideoScreen is where the actual picture taking happens
const videoLimit = 11
const Video = Machine({
id: 'video',
initial: 'init',
@jonathanstiansen
jonathanstiansen / machine.js
Last active January 30, 2021 22:54
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@jonathanstiansen
jonathanstiansen / .github-workflows-main.yml
Last active October 9, 2020 16:40 — forked from edvinasbartkus/.github-workflows-main.yml
Github Action for React Native Detox
name: Detox
on:
push:
branches:
- master
paths:
- 'customer/**'
- 'shared/**'
@jonathanstiansen
jonathanstiansen / encrypt-decrypt-react-native-node.js
Last active September 22, 2020 23:24
Encrypt in Node and Decrypt in React-Native (the reverse is almost identical)
// The purpose of this is that there was as cipher vulnerability found in the javascript implementation of the main
//. crypto-js library.
//. The native implementation they created made it unusable on react-native
// The reason we are using the node version of crypto is because the only supported AES from the react-native
//. implementation is aes-128-cbc
//. The node crypto library seems to be the only lib that supports that specific version.
// requires installing - https://www.npmjs.com/package/react-native-simple-crypto also linking
import RNSimpleCrypto from 'react-native-simple-crypto'
const toUtf8 = RNSimpleCrypto.utils.convertArrayBufferToUtf8
@jonathanstiansen
jonathanstiansen / elixir.json
Created June 14, 2020 19:20 — forked from paridin/elixir.json
VSCode Elixir Snippets
{
// Place your snippets for elixir here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
// "Print to console": {
// "prefix": "log",
// "body": [
// "console.log('$1');",
@jonathanstiansen
jonathanstiansen / machine.js
Last active December 9, 2019 17:51
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
// - XState (all XState exports)