Skip to content

Instantly share code, notes, and snippets.

Casey Watts caseywatts

Block or report user

Report or block caseywatts

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@caseywatts
caseywatts / json-pretty-print.js
Last active Nov 10, 2017
Ember helper {{json-pretty-print someJson}}
View json-pretty-print.js
// app/helpers/json-pretty-print.js
// usage {{json-pretty-print someJson}}
// see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_space_argument
import Helper from '@ember/component/helper';
export default Helper.extend({
compute(params, hash) {
const [json] = params;
return JSON.stringify(json, null, ' ');
View 0 Guidelines.md
View orgchart-search.xml
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"
xmlns:moz="http://www.mozilla.org/2006/browser/search/">
<ShortName>ORG</ShortName>
<Description>Salesforce Org Chart</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image width="16" height="16" type="image/x-icon">data:text/html;base64,PCFET0NUWVBFIGh0bWw+CjxodG1sPgogIDxoZWFkPgogICAgPHRpdGxlPlNhbGVzZm9yY2UgT3JnQ2hhcnQ8L3RpdGxlPgogICAgPHNjcmlwdCBzcmM9Ii9hc3NldHMvZDMudjMubWluLmpzIj48L3NjcmlwdD4KICAgIDxzY3JpcHQgc3JjPSIvYXNzZXRzL2pxdWVyeS0zLjAuMC5taW4uanMiPjwvc2NyaXB0PgogICAgPHNjcmlwdCBzcmM9Ii9hc3NldHMvbWFnaWNfZHluYW1pYy5qcyI+PC9zY3JpcHQ+CiAgICA8c2NyaXB0PgogICAgICAoZnVuY3Rpb24oaSxzLG8sZyxyLGEsbSl7aVsnR29vZ2xlQW5hbHl0aWNzT2JqZWN0J109cjtpW3JdPWlbcl18fGZ1bmN0aW9uKCl7CiAgICAgIChpW3JdLnE9aVtyXS5xfHxbXSkucHVzaChhcmd1bWVudHMpfSxpW3JdLmw9MSpuZXcgRGF0ZSgpO2E9cy5jcmVhdGVFbGVtZW50KG8pLAogICAgICBtPXMuZ2V0RWxlbWVudHNCeVRhZ05hbWUobylbMF07YS5hc3luYz0xO2Euc3JjPWc7bS5wYXJlbnROb2RlLmluc2VydEJlZm9yZShhLG0pCiAgICAgIH0pKHdpbmRvdyxk
@caseywatts
caseywatts / 0 README.md
Last active Aug 8, 2018
async/await in ember tests
View 0 README.md
View Minecraft.md

Short url: caseywatts.com/minecraft

Casey's server uses "Minecraft Forge" 1.12.

These instructions will install minecraft version 1.12 with forge. Forge lets us have (optional) client-side mods, like the map one. You don't have to use mods if you don't want to, but you do need the Forge 1.12 minecraft version.

These instructions assume you already have the normal app Minecraft (launcher).

Download & Install Minecraft

  • If you don't already have a Minecraft account, you'll need to make an account (and pay for it)
@caseywatts
caseywatts / ember-buffered-proxy.md
Last active Jul 5, 2017
ember-buffered-proxy usage
View ember-buffered-proxy.md

This example is for an ember-data model named 'plan'.

Proxy creation can be done in a computed property in the controller/component. It won't re-compute unless the entire plan changes (properties on plan can change and it won't trigger this). And then we can use applyBufferedChanges inside of the actions hash save action.

  // controller plans/edit.js
  planProxy: computed('plan', function() {
    return BufferedProxy.create({content: this.get('plan')});
  }),
  actions: {
@caseywatts
caseywatts / OtherWays.md
Last active Jan 31, 2019
Heroku API - Grab ID
View OtherWays.md

Other ways to do the same thing (without the copy into clipboard):

  • heroku sudo api get /apps/some-app-name | jq '.id' (sudo is herokai only)
  • heroku apps:info --json -a some-app-name | jq .app.id
@caseywatts
caseywatts / .inputrc
Last active Mar 9, 2019
BEST THING EVER
View .inputrc
# for bash
### Search History (autocomplete style~)
# Press up-arrow for previous matching command
"\e[A":history-search-backward
# Press down-arrow for next matching command
"\e[B":history-search-forward
@caseywatts
caseywatts / 0 push to talk.md
Last active Sep 5, 2019
Push To Talk - Google Meet Bookmarklet
View 0 push to talk.md

Short link to this page: http://caseywatts.com/ptt

Other gists & tricks: http://caseywatts.com/gists-and-tricks

Push To Talk in a Google Hangout (Meet)

  1. Save this bookmarklet. Right-click on boomarks toolbar Add Page...
    • Name: PTT (push to talk) or whatever you'd like (maybe short so it stays on your bookmarks toolbar)
    • URL: (paste in the bookmarklet.js contents below)
  2. In a Meet, click on the bookmarklet
You can’t perform that action at this time.