Visit my blog or connect with me on Twitter
git init
or
| #!/bin/bash | |
| play() { | |
| if [[ $1 == radio3 ]]; then | |
| playlist="http://open.live.bbc.co.uk/mediaselector/5/select/version/2.0/mediaset/http-icy-aac-lc-a/format/pls/vpid/bbc_radio_three.pls" | |
| else | |
| playlist="http://bbcmedia.ic.llnwd.net/stream/bbcmedia_$1_mf_p" | |
| fi | |
| echo $playlist | |
| if mpc | |
| then | 
| #!/usr/local/bin/python | |
| import RPi.GPIO as GPIO | |
| class RotaryEncoder: | |
| DIRECTION_CLOCKWISE = 1 | |
| DIRECTION_COUNTERCLOCKWISE = 3 | |
| prv_seq = 0 | 
| # see also: http://code.activestate.com/recipes/578150-sending-non-ascii-emails-from-python-3/ | |
| import os | |
| import smtplib | |
| from email.utils import formataddr | |
| from email.utils import formatdate | |
| from email.utils import COMMASPACE | |
| from email.header import Header | 
| #! env ruby | |
| loop do | |
| begin | |
| ping = `ping -n -c 1 -W 3 google.in 2>&1` | |
| rescue | |
| puts "Failed ping" | |
| sleep 1 | |
| next | 
Visit my blog or connect with me on Twitter
git init
or
| ########## | |
| # Win10 Initial Setup Script | |
| # Author: Disassembler <disassembler@dasm.cz> | |
| # Version: 1.7, 2016-08-15 | |
| # dasm's script: https://github.com/Disassembler0/Win10-Initial-Setup-Script/ | |
| # THIS IS A PERSONALIZED VERSION | |
| # This script leaves more MS defaults on, including MS security features. | |
| # Tweaked based on personal preferences for @alirobe 2016-11-16 - v1.7.1 | 
| // Open form and submit enquire for `rego` | |
| function getInfo(rego) { | |
| horseman | |
| .userAgent('Mozilla/5.0 (Windows NT 6.1; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0') | |
| .open(url) | |
| .type('#registration-number-ctrl input[type=text]', rego) | |
| .click('.btn-holder input') | |
| .waitForSelector('.ctrl-holder.ctrl-readonly') | |
| .html() | |
| .then(function(body) { | 
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Webcam</title> | |
| <style type="text/css"> | |
| body { | |
| text-align:center; | |
| background-color:#000000; | |
| color: #fff; | |
| } | 
| #!/usr/bin/env bash | |
| ########################################################################### | |
| # Originally written by: Henrik Bengtsson, 2014 | |
| # https://github.com/HenrikBengtsson/speedtest-cli-extras | |
| # Modified to use IFTTT by: Alasdair Allan, 2015 | |
| # License: GPL (>= 2.1) [http://www.gnu.org/licenses/gpl.html] | |
| ########################################################################### | |
| # Character for separating values | |
| # (commas are not safe, because some servers return speeds with commas) |