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
server=/.iptvpoc.alu/.discovery.iptv.microsoft.com/.iptv.vodafone.pt/.iptvdiscovery/.ims.vodafone.pt/192.168.1.1 |
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 [email protected]:~/.config/ | |
export TARGET?=home.lan | |
export TAG_DATE=`date -u +"%Y%m%d"` | |
.PHONY: snapshot init | |
init: | |
mkdir -p $(TARGET) | |
git init |
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 | |
# instant-rsyncd lets you quickly set up and start a simple, unprivileged rsync | |
# daemon with a single module in the current directory. I've found it | |
# invaluable for quick testing, and I use it when writing a list of commands | |
# that people can paste into a terminal to reproduce a daemon-related bug. | |
# Sysadmins deploying an rsync daemon for the first time may find it helpful as | |
# a starting point. | |
# | |
# Usage: instant-rsyncd MODULE PORT RSYNCD-USERNAME [RSYNC-PATH] |
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
from http.client import HTTPResponse | |
from io import BytesIO | |
from config import log | |
from struct import pack | |
from socket import AF_INET, SOCK_DGRAM, INADDR_ANY, IPPROTO_IP, IPPROTO_UDP, IP_ADD_MEMBERSHIP, IP_MULTICAST_TTL, SOL_SOCKET, SO_REUSEADDR, SO_REUSEPORT, getaddrinfo, socket, setdefaulttimeout, inet_pton, timeout as SocketTimeout | |
from utils import etree_to_dict | |
from xml.etree import ElementTree | |
from time import time | |
from dateutil.parser import parse as parse_date |
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 | |
info() { echo "[INFO] $*" ; } | |
fatal() { echo "[FATAL] $*" ; exit 1 ; } | |
AZDS_SRC="https://azuredevspacestools.blob.core.windows.net/azdssetup" | |
AZDS_ZIP=AzdsCliMacOSX.zip | |
AZDS_LIB="$HOME/Library/Azure/lib/azds-cli" | |
AZDS_BIN="$HOME/Library/Azure/bin/azds" | |
KUBECTL_PATH="$AZDS_LIB/kubectl/osx/kubectl" |
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
import binascii | |
import struct | |
def pronto2lirc(pronto): | |
codes = [long(binascii.hexlify(pronto[i:i+2]), 16) for i in range(0, len(pronto), 2)] | |
if codes[0]: | |
raise ValueError('Pronto code should start with 0000') | |
if len(codes) != 4 + 2 * (codes[2] + codes[3]): | |
raise ValueError('Number of pulse widths does not match the preamble') |
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 | |
# | |
# Tweaked for Ubuntu | |
# | |
if [ "$EUID" -ne 0 ] | |
then echo "Must be root" | |
exit | |
fi |
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
const bplist = require('bplist-creator'), | |
request = require('request'), | |
xpath = require('xpath'), | |
dom = require('xmldom').DOMParser, | |
url = require('url'), | |
fs = require('fs'); | |
const USER_AGENT = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.1 Safari/603.1.30', | |
ACCEPT_HEADERS = { |
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
const puppeteer = require('puppeteer'); | |
function sleep(ms){ | |
return new Promise(resolve=>{ | |
setTimeout(resolve,ms) | |
}) | |
} | |
(async() => { |
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
#!/usr/bin/env python | |
# Minimalist environmental data logger to Azure IoT Hub | |
# Rui Carmo, November 2018 | |
from envirophat import light, motion, weather, leds | |
from base64 import b64encode, b64decode | |
from hashlib import sha256 | |
from time import time, sleep | |
from urllib import quote_plus, urlencode |