Skip to content

Instantly share code, notes, and snippets.

View ivangonekrazy's full-sized avatar

Ivan Tam ivangonekrazy

View GitHub Profile
@ivangonekrazy
ivangonekrazy / hack.sh
Created April 1, 2012 01:17 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@ivangonekrazy
ivangonekrazy / all_the_method.py
Created April 3, 2012 20:38
<method> ALL THE <type>!!!!!
from inspect import ismethoddescriptor, getmembers
def all_the_methods(_type):
"""
example usage:
all_the_methods(str)
sample elided output:
capitalize() ALL THE <type 'str'>!!!!
center() ALL THE <type 'str'>!!!!
@ivangonekrazy
ivangonekrazy / gist:3990985
Created November 1, 2012 01:09
Send events to Loggly from ActionScript
import flash.net.URLLoader;
import flash.net.URLRequest;
import flash.net.URLRequestMethod;
import flash.net.URLVariables;
import flash.events.Event;
import flash.events.ErrorEvent;
import flash.events.IOErrorEvent;
import flash.events.SecurityErrorEvent;
@ivangonekrazy
ivangonekrazy / gist:7681057
Created November 27, 2013 18:49
Example for how to use CORS with Loggly's APIv2.
function basicAuth() {
return "Basic " + btoa("<username>:<password>");
};
$.ajax({
url: 'https://<subdomain>.loggly.com/apiv2/customer',
beforeSend: function(xhr) {
xhr.setRequestHeader("Authorization", basicAuth());
},
success: function(data) {
@ivangonekrazy
ivangonekrazy / gist:100fa3b53f28a8cb98cd
Created February 9, 2016 22:22
Example output from bitmap2Struct.py
+--------------------------------------------------------------------------------------------------------------------------------+
| |
| ****************** |
| ********************** |
| **** ****** **** |
| **** ** **** |
| *** ** *** |
| ** ****** ****** **
@ivangonekrazy
ivangonekrazy / Ivan-MDErgo1.json
Created February 10, 2016 22:45
Example Ergodox Infinity Keyboard layout (includes mappings for the FLASH command on both halves)
{
"header": {
"Author": "HaaTa (Jacob Alexander) 2015",
"Base": "Blank",
"Date": "2015-09-12",
"Generator": "KIICONF 0.2",
"KLL": "0.3c",
"Layout": "Default",
"Name": "MDErgo1",
"Version": "0.1"
@ivangonekrazy
ivangonekrazy / gist:47088c0561096cf7596e7805631c0034
Created November 6, 2019 07:37
Output `pistar-zumspotflash rpi_duplex`
pi-star@pi-star-duplex(ro):www$ sudo pistar-zumspotflash rpi_duplex
ZUMspot-v1.4.17 20190529 14.7456MHz dual ADF7021 FW by CA6JAU GitID #3c63f30
Press any key to write the rpi_duplex firmware to this modem or Ctrl-C to quit...
Flashing your rpi_duplex modem to the latest version
URL transformed to HTTPS due to an HSTS policy
--2019-11-05 23:25:34-- https://github.com/juribeparada/MMDVM_HS/releases/download/v1.4.17/install_fw_duplex.sh
Resolving github.com (github.com)... 192.30.255.113
ivan.xxx,45.55.112.52 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBAuU1ZaEA1K845sCpOzj2wkfv4oDUT32wP44nVF0cHMgjDc9qaWAW2fgZkn/1VPvA4FfH7tsimId9MjfSsjO5/g=
ivan.xxx,45.55.112.52 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBAuU1ZaEA1K845sCpOzj2wkfv4oDUT32wP44nVF0cHMgjDc9qaWAW2fgZkn/1VPvA4Connecting to github.com (github.com)|192.30.255.113|:443... connected.
HTTP request sent, awaiting response... 302 Found
@ivangonekrazy
ivangonekrazy / gist:c4a660cafe067dd9eae5f817a446dda7
Created November 6, 2019 07:38
MMDVM logs w/ overflow message
pi-star@pi-star-duplex(ro):www$ tail -f /var/log/pi-star/MMDVM-2019-11-06.log
I: 2019-11-06 07:17:36.241 Started the DMR Id lookup reload thread
I: 2019-11-06 07:17:36.370 Interfaces Info
I: 2019-11-06 07:17:36.371 IPv4: lo:127.0.0.1
I: 2019-11-06 07:17:36.371 IPv4: wlan0:192.168.86.27
I: 2019-11-06 07:17:36.371 IPv6: lo:::1
I: 2019-11-06 07:17:36.371 IPv6: wlan0:fe80::3a5:c015:eb4a:aa99%wlan0
I: 2019-11-06 07:17:36.371 Default interface is : wlan0
I: 2019-11-06 07:17:36.371 IP to show: wlan0:192.168.86.27
M: 2019-11-06 07:17:36.371 MMDVMHost-20190625_Pi-Star-v4 is running