This file contains 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/ruby | |
# REQUIRES: | |
# * rooted android, as otherwise you can't read the applications private data | |
# * to display the qr code "qrencode" (http://fukuchi.org/works/qrencode/) | |
# and "display" from ImageMagick | |
# This script "decrypts" the token from the internal state of the | |
# Battle.net Mobile Authenticator on android application, converting | |
# it into an "otpauth" url (https://code.google.com/p/google-authenticator/wiki/KeyUriFormat) |
This file contains 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/ruby | |
# REQUIRES: | |
# * rooted android, as otherwise you can't read the applications private data | |
# qrcode: https://code.google.com/p/qrencode-win32/downloads/list | |
# This script "decrypts" the token from the internal state of the | |
# Battle.net Mobile Authenticator on android application, converting | |
# it into an "otpauth" url (https://code.google.com/p/google-authenticator/wiki/KeyUriFormat) | |
# and (using qrencode and display) displays it as QR code on the screen |
This file contains 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/sh | |
# Script to send web request to MAKER channel in IFTTT.com. | |
# Arguments: | |
# $1: Event_name (this is the trigger for IFTTT and SHOULD BE configured in a IFTTT recipe in advance)) i.e: cluster_job | |
# $2: value1 (To be parsed as Maker variable, and be usable in the triggered event) OPTIONAL | |
# $3: value2 | |
# $4: value3 | |
# EXAMPLE | |
# Using recipe https://ifttt.com/recipes/301964 If Maker Event "mailto", then send an email to "value1" with subject "value2" and body "value3" |
This file contains 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
/** | |
* This Google Sheets script keeps data in the specified column sorted any time | |
* the data changes. | |
* | |
* After much research, there wasn't an easy way to automatically keep a column | |
* sorted in Google Sheets, and creating a second sheet to act as a "view" to | |
* my primary one in order to achieve that was not an option. Instead, I | |
* created a script that watches for when a cell is edited and triggers | |
* an auto sort. | |
* |
This file contains 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 | |
# This script checks that the interface is up, and that an internet connection is available | |
# It is based on code from http://askubuntu.com/questions/3299/how-to-run-cron-job-when-network-is-up | |
# | |
# Then it sleeps for a random number of seconds between 30 and 600. | |
# This is based on code from http://tldp.org/LDP/abs/html/randomvar.html | |
# | |
# Collated by @JonTheNiceGuy on 2015-10-15 | |
# Fix from @p1r473 on 2023-05-17 with thanks! |
This file contains 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 | |
# https://retropie.org.uk/forum/topic/2295/runcommand-warning-if-voltage-temperature-throttling | |
#Flag Bits | |
UNDERVOLTED=0x1 | |
CAPPED=0x2 | |
THROTTLED=0x4 | |
HAS_UNDERVOLTED=0x10000 | |
HAS_CAPPED=0x20000 |
This file contains 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
/*! QRious v4.0.2 | (C) 2017 Alasdair Mercer | GPL v3 License | |
Based on jsqrencode | (C) 2010 [email protected] | GPL v3 License */ | |
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.QRious=e()}(this,function(){"use strict";function t(t,e){var n;return"function"==typeof Object.create?n=Object.create(t):(s.prototype=t,n=new s,s.prototype=null),e&&i(!0,n,e),n}function e(e,n,s,r){var o=this;return"string"!=typeof e&&(r=s,s=n,n=e,e=null),"function"!=typeof n&&(r=s,s=n,n=function(){return o.apply(this,arguments)}),i(!1,n,o,r),n.prototype=t(o.prototype,s),n.prototype.constructor=n,n.class_=e||o.class_,n.super_=o,n}function i(t,e,i){for(var n,s,a=0,h=(i=o.call(arguments,2)).length;a<h;a++){s=i[a];for(n in s)t&&!r.call(s,n)||(e[n]=s[n])}}function n(){}var s=function(){},r=Object.prototype.hasOwnProperty,o=Array.prototype.slice,a=e;n.class_="Nevis",n.super_=Object,n.extend=a;var h=n,f=h.extend(function(t,e,i){this.qrious=t,this.element=e, |
This file contains 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
# This is to help address this Termux/Android issue: | |
# https://github.com/termux/termux-packages/issues/1174 | |
function _getAndroidAllDNS() | |
{ | |
local -n dnsMapRef=$1 | |
local -n domainMapRef=$2 | |
# The logic here is from experimentation based on: | |
# https://www.reddit.com/r/termux/comments/1249mqx/use_dhcp_provided_dns_in_resolveconf/ |