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
| function parseBanks() { | |
| var calendar = CalendarApp.getCalendarsByName('[a] Banks')[0], | |
| threads = GmailApp.search('-in:Trash AND ('+ | |
| 'from:infoservices@information.deutsche-bank.de'+ | |
| ' OR (to:number26@suat.be AND "You received a transfer of")'+ | |
| ' OR (to:number26@suat.be AND "Your payment of")'+ | |
| ' OR (to:number26@suat.be AND "CASH26 Withdraw")'+ | |
| ' OR (to:number26@suat.be AND "Direct Debit collected")'+ | |
| ' OR (to:number26@suat.be AND "Refund successful")'+ | |
| ' OR (to:number26@suat.be 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 | |
| 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
| <?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
| 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
| function myFunction() { | |
| var calendar = CalendarApp.getCalendarsByName('[a] delivery')[0], | |
| threads = GmailApp.search('from:versandbestaetigung@amazon.de'), | |
| 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
| function myFunction() { | |
| var labelName = "YouTube", | |
| label = GmailApp.getUserLabelByName(labelName), | |
| threads = label.getThreads(), | |
| msg, match, date, now = new Date(), afterTime = 1000 * 60 * 60; | |
| Logger.log("Threads: " + threads.length); | |
| for (var x in threads) { | |
| Logger.log("Found thread: " + threads[x].getFirstMessageSubject()); | |
| msg = threads[x].getMessages(); | |
| match = msg[0].getPlainBody().match(/watch\?v=(.*?)\&/); |
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
| hide all files whose Path matches: | |
| .*/Users/[^\/]+/(\.bash_sessions|\.((?!bash_).)*|npm\-debug\.log) |
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 | |
| i=0 | |
| for i in `seq 1 10`; do | |
| starttime=`gdate +%s%3N` | |
| start=`gdate +%s -r "$HOME/Library/Application Support/Alfred 2/Databases/clipboard.alfdb"` | |
| echo `gdate +%s%3N` | pbcopy | |
| until [ start != current ]; do | |
| current=`gdate +%s -r "$HOME/Library/Application Support/Alfred 2/Databases/clipboard.alfdb"` | |
| done | |
| endtime=`gdate +%s%3N` |