Skip to content

Instantly share code, notes, and snippets.

@achambers
achambers / README.md
Last active January 15, 2025 09:31
Apply PR patch to monorepo branch

This script is used to help engineers apply their PRs to the migrated monorepo if rebasing is causing issues.

The script can be used via npx like so:

npx https://gist.github.com/achambers/c22c1e253107dfc5f8eb707a72e4d8cb -s <source-branch>

Where <source-branch> is the branch name of the PR branch.

@achambers
achambers / machine.js
Last active October 19, 2021 17:27
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@achambers
achambers / machine.js
Last active October 18, 2021 13:45
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
// - XState (all XState exports)
@achambers
achambers / machine.js
Created October 18, 2021 10:42
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@achambers
achambers / machine.js
Last active June 4, 2021 12:30
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions

Keybase proof

I hereby claim:

  • I am achambers on github.
  • I am achambers (https://keybase.io/achambers) on keybase.
  • I have a public key whose fingerprint is 2A39 4297 B06D 227B CE11 5A56 5CFB 14B6 EE41 872C

To claim this, I am signing this object:

@achambers
achambers / Client.js
Created February 25, 2014 09:39
Unit testing an arbitrary Ember.Object
export default Ember.Object.extend({
location: function() {
return new Ember.RSVP.Promise(function(resolve, reject) {
//Simulate some async operation
Ember.run.later(function() {
resolve({lat: "123", lon: "234", city: "London"});
}, 2000);
});
}
});
" copy all this into a vim buffer, save it, then...
" source the file by typing :so %
" Now the vim buffer acts like a specialized application for mastering vim
" There are two queues, Study and Known. Depending how confident you feel
" about the item you are currently learning, you can move it down several
" positions, all the way to the end of the Study queue, or to the Known
" queue.
" type ,, (that's comma comma)
@achambers
achambers / gist:2305772
Created April 4, 2012 21:21
Require oci8
vagrant@lucid32:~$ irb
irb(main):001:0> require 'rubygems'
irb(main):001:0> require 'oci8'
@achambers
achambers / gist:2305759
Created April 4, 2012 21:19
Install instantclient in Linux
digital-alley:tmpdir aaron$ vagrant up
digital-alley:tmpdir aaron$ vagrant ssh
vagrant@lucid32:~$ sudo apt-get install unzip
vagrant@lucid32:~$ sudo apt-get install rpm
vagrant@lucid32:~$ cd /tmp
vagrant@lucid32:~$ cp /vagrant/instantclient-* .
vagrant@lucid32:~$ cd /opt
vagrant@lucid32:~$ sudo mkdir oracle
vagrant@lucid32:~$ cd oracle