Skip to content

Instantly share code, notes, and snippets.

🤷‍♀
¯\_(ツ)_/¯

Robin Mehner rmehner

🤷‍♀
¯\_(ツ)_/¯
Block or report user

Report or block rmehner

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
@rmehner
rmehner / dexie-unique-compound-indizes.js
Last active Mar 3, 2020
Using unique compound indizes with Dexie.js
View dexie-unique-compound-indizes.js
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 })
View v2.diff
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')
}
@rmehner
rmehner / remove-android-sdk.sh
Last active Mar 1, 2017
Remove everything related to Android for a clean start (OHAI cordova)
View remove-android-sdk.sh
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
View deploy.sh
#!/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"
}
@rmehner
rmehner / install_pdftk.sh
Last active Oct 12, 2018
Install PDFTk without touching up the permissions
View install_pdftk.sh
#!/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; }
View fix_homebrew.sh
sudo chown $(whoami):admin /usr/local && sudo chown -R $(whoami):admin /usr/local
View adb_screenshot.sh
# thank you http://blog.shvetsov.com/2013/02/grab-android-screenshot-to-computer-via.html
adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > screen.png
View CoC.md

Code of Conduct

Be excellent to each other!

Our goal is to have an awesome and inclusive community-driven conference where people meet, hang out together, chat, listen to talks, exchange ideas and make new friends. Any harmful or discriminating behaviour will not be tolerated and results in the offending person being expelled from the conference.

Our complete Code of Conduct helps us to make sure that we are as inclusive and safe as we want everyone to be.

We care about you. If anything happens, please contact us.

@rmehner
rmehner / delete-databases.js
Created Dec 11, 2014
Delete all indexedDB databases
View delete-databases.js
indexedDB.webkitGetDatabaseNames().onsuccess = function(event) {
Array.prototype.forEach.call(event.target.result, indexedDB.deleteDatabase.bind(indexedDB));
}
@rmehner
rmehner / reinstall-rubies.sh
Created Apr 6, 2014
Reinstalls all rbenv rubies. Keeping that here for the regular libyaml update ;-)
View reinstall-rubies.sh
for ruby in ~/.rbenv/versions/*; do
rbenv uninstall -f ${ruby##*/}
rbenv install ${ruby##*/}
done
You can’t perform that action at this time.