Skip to content

Instantly share code, notes, and snippets.

@Palakis
Palakis / ffos_repackage.js
Created August 13, 2015 18:52
Cordova < 3.7.0 : repackage Firefox OS app (because the integrated method produces corrupted archives)
#!/usr/bin/env node
// Put this file in the hooks/after_compile folder and give it execution rights
var fs = require('fs');
var rootdir = process.argv[2];
if(rootdir) {
var platforms = (process.env.CORDOVA_PLATFORMS ? process.env.CORDOVA_PLATFORMS.split(',') : []);
for(var x = 0; x < platforms.length; x++) {
try {
var platform = platforms[x].trim().toLowerCase();
@Palakis
Palakis / ddns.py
Last active August 28, 2021 17:39
Behind-NAT-style Dynamic DNS script, designed to run on Ubiquiti EdgeRouter hardware
#!/usr/bin/python
import socket
import fcntl
import struct
import httplib
import json
import sys
from base64 import b64encode
from urllib import urlencode
@Palakis
Palakis / gist:daadcd052095316d5a2d
Last active August 29, 2015 14:14
OpenVPN autokill
#!/usr/bin/env python
import sys
import time
import telnetlib
if len(sys.argv) < 3:
print "Usage : "+__file__+" <host> <port> <client to kill>"
exit()
host = sys.argv[1]