An exceptionally handsome way to track your Stack Overflow badges.
Note: Badge Overflow now works with all Stack Exchange sites.
Created by Adam & Stephanie Sharp.
A Dashing widget that
An exceptionally handsome way to track your Stack Overflow badges.
Note: Badge Overflow now works with all Stack Exchange sites.
Created by Adam & Stephanie Sharp.
A Dashing widget that
# https://gist.github.com/stefansundin/6261442 | |
# Python 3.x | |
# Binary search for the correct clen parameter for YouTube live streams, which is useful when a segment is no longer listed in the playlist file (check EXT-X-EARLIEST-MEDIA-SEQUENCE). | |
# It's quick and dirty. clen is always a multiple of 188 (since it is TS). lmt and dur does not have any impact it seems. | |
# Usually finds the correct url in about 15 tries. | |
# See http://stefansundin.com/blog/452#comments | |
# TODO: add threading to process multiple sequence numbers at the same time. | |
""" | |
Regexps to extract clen and dur from a playlist: |
#!/bin/bash | |
# | |
# The reason of creating this script is that Endpoint Security VPN installs it's own application firewall kext cpfw.kext | |
# which prevents for example PPTP connections from this computer, which is not appropriate if you need subj connection just | |
# from time to time | |
# | |
# Usage: ./checkpoint.sh | |
# | |
# The script checks if Enpoint Security VPN is running. If it is, then it shuts it down, if it is not, it fires it up. | |
# Or, make an Automator action and paste the script. |
These instructions work for the Raspberry Pi running Raspbian (hard float) and create a hardware optimized version of NodeJS for the Raspberry PI, (and include a working install and NPM!!!):
Install Raspbian - http://www.raspberrypi.org/downloads
Install the necessary dependecies:
sudo apt-get install git-core build-essential
(If you just installed git then you need to administer your git identity first, else adding the patches below will fail!!!)
bid() { | |
local shortname location | |
# combine all args as regex | |
# (and remove ".app" from the end if it exists due to autocomplete) | |
shortname=$(echo "${@%%.app}"|sed 's/ /.*/g') | |
# if the file is a full match in apps folder, roll with it | |
if [ -d "/Applications/$shortname.app" ]; then | |
location="/Applications/$shortname.app" | |
else # otherwise, start searching |
#!/bin/bash | |
# bash generate random alphanumeric string | |
# | |
# bash generate random 32 character alphanumeric string (upper and lowercase) and | |
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
# bash generate random 32 character alphanumeric string (lowercase only) | |
cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1 |
L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns
Compress 1K bytes with Zippy ............. 3,000 ns = 3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns = 20 µs
SSD random read ........................ 150,000 ns = 150 µs
Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs