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
| #!/usr/bin/env bash | |
| adb shell input text $(pbpaste | sed -e 's/\(.\)/\\\1/g') |
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
| 'use strict'; | |
| const path = require('path'); | |
| const fs = require('fs'); | |
| const argv = process.argv.slice(2); | |
| let [filename, prefix = ''] = argv; | |
| if (prefix) { | |
| prefix = `${prefix}_`; | |
| } |
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 cp = require('child_process'); | |
| const clip = cp.exec('pbcopy', (_err, _stdout, _stderr) => {/* optionally do something */}); | |
| clip.stdin.write(aString); | |
| clip.stdin.end(() => process.stdout.write(`\rCopied ${aString.length} characters.\n`)); |
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
| function StorageConfig(storeProvider) { | |
| storeProvider.setStore(_determineStoreType()); | |
| function _determineStoreType() { | |
| if ((typeof localStorage === 'object') && _checkStorage(localStorage)) { | |
| return 'localStorage'; | |
| } else if ((typeof sessionStorage === 'object') && _checkStorage(sessionStorage)) { | |
| return 'sessionStorage'; | |
| } else { |
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
| # New repository | |
| mkdir <repo> && cd <repo> | |
| git init | |
| git remote add –f <name> <url> | |
| git config core.sparsecheckout true | |
| echo some/dir/ >> .git/info/sparse-checkout | |
| echo another/sub/tree >> .git/info/sparse-checkout | |
| git pull <remote> <branch> | |
| # Existing repository |
NewerOlder