A ghetto webhook for automatically deploying after a Docker Hub build.
sudo apt-get install php-cli| #!/bin/bash | |
| set -e | |
| rm -f $(find app/src -iname "Triple*.java") | |
| JAVA_FILES=$(find app/src -iname "*.java") | |
| EXISTING_KOTLIN_FILES=$(find app/src -iname "*.kt") | |
| for FILE in $JAVA_FILES ; do |
| <div class="explorometer"> | |
| <h2 style="text-align: center; color: #000000; font-weight: bold;">Beeline Explorometer™</h2> | |
| <h2 style="text-align: center; color: #ffffff; font-weight: bold;"><span class="journeys">34,994</span> rides</h2> | |
| <h2 style="text-align: center; color: #ffffff; font-weight: bold;"><span class="distance">313,362</span> km</h2> | |
| </div> | |
| <script src="https://www.gstatic.com/firebasejs/4.5.0/firebase.js"></script> | |
| <script> | |
| firebase.initializeApp({ | |
| databaseURL: "https://beeline-e46ed.firebaseio.com" | |
| }); |
| const _ = require('lodash'); | |
| function forEachPage(ref, pageSize, callback, startAt) { | |
| var query = ref.orderByKey(); | |
| if (startAt) query = query.startAt(startAt); | |
| return query.limitToFirst(pageSize + 1) // Ask for one extra | |
| .once('value') | |
| .then((snapshot) => { | |
| if (snapshot.numChildren() <= pageSize) { | |
| // There was no extra value returned, this is the last page |
| /* Get a value from a nested object using just a string for readability | |
| * | |
| * Example: | |
| * var o = {first: {second: {third: {a: 1, b: 2}}}}; | |
| * o.get_in('first.second.third.b'); // => 2 | |
| */ | |
| Object.prototype.get_in = function(selector) { | |
| return selector.split('.').reduce( | |
| function(obj, key) { | |
| return obj[key]; |
| apk=app.apk count=0 ; for dex in $(unzip -Z1 $apk classes*.dex); do count=$(($count + $(unzip -p $apk $dex | head -c 92 | tail -c 4 | hexdump -e '1/4 "%d\n"'))) ; done ; echo $count |
| /* | |
| This module can be required normally: | |
| var optionally_global = require('./optionally_global'); | |
| console.log(optionally_global.bar()); | |
| Or its exports can be made global: | |
| require('./optionally_global').global(); | |
| console.log(bar()); |
| # Emulate a user in a terminal for the purposes of a video recording | |
| # Waits 1 second for every blank line | |
| tell application "Terminal" | |
| activate | |
| end tell | |
| delay 1 | |
| tell application "System Events" |
| # Code has moved to: https://github.com/chetbox/SayYouTubeComments |