If you're like me and you use semver for versioning your tags, you probably hate when you do this:
$ git tag -l
0.1.0
0.10.0
0.2.0
0.3.0
0.3.1
0.4.0
0.5.0
<?php | |
############################################################################### | |
# Project: GDAL2Tiles, Google Summer of Code 2007 & 2008 | |
# Global Map Tiles Classes | |
# Purpose: Convert a raster into TMS tiles, create KML SuperOverlay EPSG:4326, | |
# generate a simple HTML viewers based on Google Maps and OpenLayers | |
# Author: Klokan Petr Pridal, klokan at klokan dot cz | |
# Web: http://www.klokan.cz/projects/gdal2tiles/ | |
# | |
############################################################################### |
# install perlbrew | |
sudo yum install -y perl perl-CPAN perl-CPAN-Meta | |
sudo cpan App::cpanminus | |
sudo cpanm install App::perlbrew | |
# install cpanm and perl latest | |
perlbrew install-cpanm | |
perlbrew install-patchperl | |
perlbrew install 5.22.0 |
import board | |
import time | |
import neopixel | |
from random import choice, randint | |
leds = neopixel.NeoPixel(board.RX, 50, pixel_order=neopixel.RGB) | |
color = (128, 0, 255) | |
def permutations(iterable, r=None): |
""" | |
A file lock implementation that tries to avoid platform specific | |
issues. It is inspired by a whole bunch of different implementations | |
listed below. | |
- https://bitbucket.org/jaraco/yg.lockfile/src/6c448dcbf6e5/yg/lockfile/__init__.py | |
- http://svn.zope.org/zc.lockfile/trunk/src/zc/lockfile/__init__.py?rev=121133&view=markup | |
- http://stackoverflow.com/questions/489861/locking-a-file-in-python | |
- http://www.evanfosmark.com/2009/01/cross-platform-file-locking-support-in-python/ | |
- http://packages.python.org/lockfile/lockfile.html |
account:DisableRegion | |
account:EnableRegion | |
account:ListRegions | |
activate:CreateForm | |
activate:GetAccountContact | |
activate:GetContentInfo | |
activate:GetCosts | |
activate:GetCredits | |
activate:GetMemberInfo | |
activate:GetProgram |
If you're like me and you use semver for versioning your tags, you probably hate when you do this:
$ git tag -l
0.1.0
0.10.0
0.2.0
0.3.0
0.3.1
0.4.0
0.5.0
#!/bin/sh | |
# The script configures simultaneous AP and Managed Mode Wifi on Raspberry Pi Zero W (should also work on Raspberry Pi 3) | |
# Usage: curl https://gist.githubusercontent.com/lukicdarkoo/6b92d182d37d0a10400060d8344f86e4/raw | sh -s WifiSSID WifiPass APSSID APPass | |
# Licence: GPLv3 | |
# Author: Darko Lukic <lukicdarkoo@gmail.com> | |
# Special thanks to: https://albeec13.github.io/2017/09/26/raspberry-pi-zero-w-simultaneous-ap-and-managed-mode-wifi/ | |
MAC_ADDRESS="$(cat /sys/class/net/wlan0/address)" | |
CLIENT_SSID="${1}" | |
CLIENT_PASSPHRASE="${2}" |
# Based on gist https://gist.github.com/staaldraad/4c4c80800ce15b6bef1c1186eaa8da9f | |
# - added TCP states | |
awk 'BEGIN{states["01"]="TCP_ESTABLISHED" | |
states["02"]="TCP_SYN_SENT" | |
states["03"]="TCP_SYN_RECV" | |
states["04"]="TCP_FIN_WAIT1" | |
states["05"]="TCP_FIN_WAIT2" | |
states["06"]="TCP_TIME_WAIT" | |
states["07"]="TCP_CLOSE" |
function int2ip (ipInt) { | |
return ( (ipInt>>>24) +'.' + (ipInt>>16 & 255) +'.' + (ipInt>>8 & 255) +'.' + (ipInt & 255) ); | |
} |
//**dataURL to blob** | |
function dataURLtoBlob(dataurl) { | |
var arr = dataurl.split(','), mime = arr[0].match(/:(.*?);/)[1], | |
bstr = atob(arr[1]), n = bstr.length, u8arr = new Uint8Array(n); | |
while(n--){ | |
u8arr[n] = bstr.charCodeAt(n); | |
} | |
return new Blob([u8arr], {type:mime}); | |
} |