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 myFunction() { | |
| var calendar = CalendarApp.getCalendarsByName('[a] delivery')[0], | |
| threads = GmailApp.search('from:[email protected]'), | |
| msg, matchDate, matchProduct, | |
| months = [ 'jan', 'feb', 'mär', 'apr', 'mai', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'dez' ], | |
| delivDay, delivMonth, delivYear; | |
| Logger.log("Threads: " + threads.length); | |
| for (var x in threads) { | |
| Logger.log("Found thread: " + threads[x].getFirstMessageSubject()); | |
| msg = threads[x].getMessages(); |
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
| export CLICOLOR=1 | |
| export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx | |
| export EDITOR=nano | |
| export ANDROID_HOME=/usr/local/opt/android-sdk | |
| ################## | |
| # export PS1='\033]0;$PWD\007\[\033[01;31m\]\u\[\033[m\] \[\e[34;1m\]\w \[\033[m\]\$ \[\033[m\]' |
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
| <?php | |
| $a = [ | |
| "some" => [ | |
| "thing" => [ | |
| "is" => [ | |
| "happening" => [ | |
| 50, 20, 90 | |
| ] | |
| ] | |
| ], |
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
| <?php | |
| function parse_interface($data) { | |
| // remove comments | |
| $data = preg_replace('~\#.*$~m', "\n", $data); | |
| preg_match_all('~\nauto\s+(\w+)\niface \1 inet (\w+)\n([ \t]+.+\n)*~', $data, $m, PREG_SET_ORDER); | |
| $result = []; | |
| foreach ($m as $v) { | |
| $iface = []; |
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 parseBanks() { | |
| var calendar = CalendarApp.getCalendarsByName('[a] Banks')[0], | |
| threads = GmailApp.search('-in:Trash AND ('+ | |
| 'from:[email protected]'+ | |
| ' OR (to:[email protected] AND "You received a transfer of")'+ | |
| ' OR (to:[email protected] AND "Your payment of")'+ | |
| ' OR (to:[email protected] AND "CASH26 Withdraw")'+ | |
| ' OR (to:[email protected] AND "Direct Debit collected")'+ | |
| ' OR (to:[email protected] AND "Refund successful")'+ | |
| ' OR (to:[email protected] AND "Transfer received")'+ |
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
| <?php | |
| /** | |
| * @author FirePanther (http://suat.be) | |
| * @copyright DevMe (http://devme.de) | |
| * @description youtube.php: Download all videos of channels | |
| * @date 17/04/16 | |
| * @dependencies - youtube-dl (same location): https://yt-dl.org/downloads/2016.04.13/youtube-dl | |
| * - brew: AtomicParsley, coreutils (gtouch, gecho) | |
| */ |
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
| /** | |
| * Permanenty delete some Google Drive files from the trash. | |
| */ | |
| function run() { | |
| var trashed = DriveApp.getTrashedFiles(); | |
| while (trashed.hasNext()) { | |
| parseTrashedFile(trashed.next()); | |
| } | |
| } |
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
| <?php | |
| sd('./', parseFile); | |
| /** | |
| * recursive scandir | |
| */ | |
| function sd($d, $cb) { | |
| $s = scandir($d); | |
| foreach ($s as $f) { | |
| if ($f[0] == '.') continue; |
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 | |
| # requires 'tag' binary from https://github.com/jdberry/tag | |
| # auto git tag | |
| { | |
| find $HOME -type d \ | |
| ! -path '*Trash' \ | |
| -name ".git" -exec dirname {} \; | while read line; do \ | |
| ./tag -a Git "$line"; done |