This file contains 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
function mansplain() { | |
desc=$(whatis $1 2>&1 | head -1 | grep -o -P '\- .*$' | cut -c 3-) | |
if [[ -z "$desc" ]]; then | |
echo "Well I've never heard of \"$1\", so it doesn't exist" | |
else | |
echo "Well, actually, it's more like $desc" | |
fi | |
} |
This file contains 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
#!/usr/bin/env zsh | |
# Make sure we have all the utilities we need | |
requiredBins=('qrencode' 'feh') | |
if [[ `uname` == "Darwin" ]]; then | |
requiredBins+=("pbpaste") | |
else | |
requiredBins+=("xclip") | |
fi |
This file contains 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
[FunctionName("SendSms")] | |
public static async Task<IActionResult> Run( | |
// This is an HTTP trigger accepting POST requests. That's why we are able to invoke it using Postman. | |
[HttpTrigger(AuthorizationLevel.Function, "post", Route = "tygerbytes/sygnal")] HttpRequest req, | |
ILogger log, | |
ExecutionContext context) | |
{ | |
// The FuncConfig class encapsulates environment-specific settings like those | |
// TWILIO... environment variables. | |
var funcConfig = new FuncConfig(context); |
This file contains 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
<!-- Add this before </body> --> | |
<script> | |
if (window.netlifyIdentity) { | |
window.netlifyIdentity.on("init", user => { | |
if (!user) { | |
window.netlifyIdentity.on("login", () => { | |
document.location.href = "/admin/"; | |
}); | |
} | |
}); |
This file contains 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
computed: { | |
// Do this | |
missingRaceTime() { | |
return this.submitted && this.fiveKmRaceTime === ''; | |
}, | |
... |
This file contains 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
computed: { | |
// Don't do this | |
missingRaceTime: () => { | |
return this.submitted && this.fiveKmRaceTime === ''; | |
}, | |
... |
This file contains 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
export default { | |
name: 'RunbyPace', | |
beforeCreate() { | |
this.lib = this.$store.state.RunbyLib; | |
}, | |
... |
This file contains 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
new Vue({ | |
render: h => h(App), | |
router, | |
// Provide the store using the "store" option. | |
// this will inject the store instance to all child components. | |
store, | |
}).$mount('#app'); |
This file contains 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
import Vuex from 'vuex'; | |
... | |
// The library I want to share amongst the components | |
import RunbyLib from './runbylib'; | |
... | |
Vue.use(Vuex); | |
const store = new Vuex.Store({ | |
state: { | |
RunbyLib, |
This file contains 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
<template> | |
<div id="app" class="container"> | |
... | |
<router-view> | |
... | |
</div> | |
</template> | |
... |
NewerOlder