🤷♀️
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
// Credit to @steobrien from https://gist.github.com/rmehner/b9a41d9f659c9b1c3340#gistcomment-2940034 | |
// for modern browsers, this works: | |
const dbs = await window.indexedDB.databases() | |
dbs.forEach(db => { window.indexedDB.deleteDatabase(db.name) }) | |
// for older browsers, have a look at previous revisions of this gist. |
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
/** | |
* @flow | |
*/ | |
'use strict'; | |
/* | |
* Flow types for the Babylon AST. | |
*/ |
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 bash | |
# This is based on this excellent gist https://gist.github.com/jvenator/9672772a631c117da151 | |
# Nothing of this is my original work, except that I made the download link an argument | |
# to this script, so it installs on OSX 10.11 | |
# | |
# Thank you jvenator & sethetter | |
set -e | |
error() { info "$1"; exit 1; } |
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
const db = new Dexie('friends') | |
db.version(1).stores({ | |
friends: '++id,&[name+age]', | |
}) | |
async function main() { | |
await db.friends.add({ name: 'Robin', age: 1337 }) | |
// this will fail with: | |
// ConstraintError: A mutation operation in the transaction failed because a constraint was not satisfied. | |
await db.friends.add({ name: 'Robin', age: 1337 }) |
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
diff --git "a/test/fixture/r\303\266ck/d\303\266ts" "b/test/fixture/r\303\266ck/d\303\266ts" | |
new file mode 100644 | |
index 0000000..e69de29 | |
diff --git a/test/index.js b/test/index.js | |
index 22efd0d..fd749ee 100644 | |
--- a/test/index.js | |
+++ b/test/index.js | |
@@ -27,11 +27,16 @@ function testSpecialChars() { | |
assert.equal(trueCasePathSync('test/fixture/F[U&N%K)Y'), path.join(__dirname, 'fixture/f[u&n%k)y'), 'works with file names w/ special chars') | |
} |
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
rm -Rf /Applications/Android\ Studio.app | |
rm -Rf ~/Library/Preferences/AndroidStudio* | |
rm -Rf ~/Library/Preferences/com.google.android.* | |
rm -Rf ~/Library/Preferences/com.android.* | |
rm -Rf ~/Library/Application\ Support/AndroidStudio* | |
rm -Rf ~/Library/Logs/AndroidStudio* | |
rm -Rf ~/Library/Caches/AndroidStudio* | |
rm -Rf ~/.AndroidStudio* | |
rm -Rf ~/AndroidStudioProjects | |
rm -Rf ~/.gradle |
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
<?php | |
#### configuration #### | |
$email = 'YOUR_EMAIL_ADDRESS'; | |
$token = 'YOUR_API_TOKEN'; | |
$hostName = 'all'; // use 'all' if you want to update all hosts | |
#### cURL request below #### | |
$json_data = json_encode(array( |
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 bash | |
set -e | |
info() { echo "$0: $1"; } | |
skip() { info "${1}. Skipping build."; exit 0; } | |
[[ "$TRAVIS_PULL_REQUEST" == "false" ]] || { | |
skip "This build was triggered by a pull request" | |
} |
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
/** | |
* Play around with the numbers and the method names! | |
* | |
* For example: use counterClockwise and see what happens | |
*/ | |
var arDrone = require('ar-drone'); | |
var client = arDrone.createClient(); | |
client.takeoff(); |
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
// note: this does not work for nested objects | |
var toQueryString = function(obj) { | |
return Object.keys(obj).map(function(key) { | |
return key + '=' + obj[key]; | |
}).join('&'); | |
}; | |
toQueryString({}); // returns '' | |
toQueryString({foo: 'bar'}); // returns 'foo=bar' | |
toQueryString({billable: true, locked: false}); // returns 'billable=true&locked=false' |
NewerOlder