This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# suggestions: switch synths, play with the sound envelope, add samples, stretch/compress samples with :rate | |
define :phone do | |
use_bpm 60 | |
##| in_thread do | |
##| loop do | |
##| use_synth :dark_ambience | |
##| sync :first_cue | |
##| play chord(:A2, :minor), amp: 3, decay: 3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cleanup() { | |
echo "destroy your machine" | |
fly m destroy --force | |
exit 0 | |
} | |
trap 'cleanup' SIGINT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Mute these words in your settings here: https://twitter.com/settings/muted_keywords | |
ActivityTweet | |
generic_activity_highlights | |
generic_activity_momentsbreaking | |
RankedOrganicTweet | |
suggest_activity | |
suggest_activity_feed | |
suggest_activity_highlights | |
suggest_activity_tweet |
- Location - The location of the application. Usually just a URL, but the location can contain multiple pieces of information that can be used by an app
- pathname - The "file/directory" portion of the URL, like
invoices/123
- search - The stuff after
?
in a URL like/assignments?showGrades=1
. - query - A parsed version of search, usually an object but not a standard browser feature.
- hash - The
#
portion of the URL. This is not available to servers inrequest.url
so its client only. By default it means which part of the page the user should be scrolled to, but developers use it for various things. - state - Object associated with a location. Think of it like a hidden URL query. It's state you want to keep with a specific location, but you don't want it to be visible in the URL.
- pathname - The "file/directory" portion of the URL, like
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const {Provider, Consumer: ThemeConsumer} = React.createContext() | |
class ThemeProvider extends React.Component { | |
setTheme = theme => this.setState({theme}) | |
state = {theme: 'dark', setTheme: this.setTheme} | |
render() { | |
return <Provider value={this.state} {...this.props} /> | |
} | |
} |
This content moved here: https://exploringjs.com/impatient-js/ch_arrays.html#quickref-arrays
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
There are many methods for writing Vault policies. | |
This gist was created to collect the most common methods | |
such that they can be easily used as references for syntax, | |
as well as evaluation for which method suits a particular purpose. | |
TODO: | |
- Add complex policy examples | |
- Add @json.file examples |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Test 2 way data binding</title> | |
</head> | |
<body> | |
<div id="app">{{ abc }} - {{ def }} = {{ abc-def }} </div> | |
<button id='add'>add</button> | |
<button id='double'>double</button> | |
<script src='main.js'></script> |
I recently had several days of extremely frustrating experiences with service workers. Here are a few things I've since learned which would have made my life much easier but which isn't particularly obvious from most of the blog posts and videos I've seen.
I'll add to this list over time – suggested additions welcome in the comments or via twitter.com/rich_harris.
Chrome 51 has some pretty wild behaviour related to console.log
in service workers. Canary doesn't, and it has a load of really good service worker related stuff in devtools.
NewerOlder