Skip to content

Instantly share code, notes, and snippets.

@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 28, 2021
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

Unrelated update: my book is out! Debugging Your Brain is an applied psychology / self-help book

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)
@caseywatts
caseywatts / darken.md
Last active Mar 31, 2021
Darkening PDFs
View darken.md

short url to these instructions: caseywatts.com/darken

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

Using Monochrome (recommended)

  • obtain your ugly, gray pdf
  • brew install imagemagick
  • brew install ghostscript
  • magic command!
@caseywatts
caseywatts / gist:6cf9391e7ddd25a331dafbed5cee8a8e
Created Mar 27, 2017
Steam + Controller on OSX via Wine
View gist:6cf9391e7ddd25a331dafbed5cee8a8e
  • brew install Caskroom/cask/wineskin-winery
  • Open app "Wineskin Winery"
    • Click "Create New Blank Wrapper" and name it "WindowsSteam"
    • Right click on app "WindowsSteam" and click "show package contents"
    • Open "Wineskin" app that lives inside the "WindowsSteam" app
    • "Advanced"
    • "middle tab"
    • "winetricks"
    • "update winetricks"
    • Install dotnet45
View listenonrepeat.md

This bookmarklet takes you from a youtube video page to the listenonrepeat page for that video

  1. Save this bookmarklet. Right-click on boomarks toolbar Add Page...
  • Name: yt∞ or whatever you'd like (maybe short so it stays on your bookmarks toolbar)
  • URL: javascript:(document.location.href = document.location.href.replace('youtube.com', 'listenonrepeat.com'))();
  1. When on a youtube video page, click this bookmarklet to be taken to the listenonrepeat page 🎉
@caseywatts
caseywatts / quicktime-hangouts-recording.md
Last active Oct 19, 2021
Quicktime Hangouts Recording (using soundflower for audio)
View quicktime-hangouts-recording.md

Short link to this page: caseywatts.com/quicktime

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

Unrelated update: my book is out! Debugging Your Brain is an applied psychology / self-help book

Quicktime + Hangouts Recording

Scenario: You want to talk with someone over google hangouts (like for a user study), and you want to record BOTH:

@caseywatts
caseywatts / stubbing-relationships-ember.md
Last active Jan 18, 2017
Stubbing Relationships in Model Unit Tests
View stubbing-relationships-ember.md
UPDATE: Actually, doing this with `reopen` is apparently deprecated. Back to creating actual objects for relationships -_-
don't do this below stuff

Stubbing relationships in model unit tests

// model
export default DS.Model.extend({
@caseywatts
caseywatts / 0-README.md
Last active Nov 5, 2019
WHAT IF you could magically have browser-sync (livereload+mobileview) on every static html project, without any setup in the project? You can 🎉🎉🎉
View 0-README.md