sudo apt-get update
sudo apt-get upgrade
sudo apt-get install avahi-daemon
<?php | |
$screenshots = array(); | |
$url = 'https://itunes.apple.com/us/app/citymapper-ultimate-real-time/id469463298?mt=8'; | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, $url); | |
curl_setopt($ch, CURLOPT_USERAGENT, "AppleWatchStore/1 CFNetwork/720.2.4 Darwin/14.1.0 (x86_64)"); | |
curl_setopt($ch, CURLOPT_HTTPHEADER, array('X-Apple-Store-Front: 143441-1,20')); | |
curl_setopt($ch, CURLOPT_TIMEOUT, 0); |
# On Windows 7, 8, 10 Hosts file is in c:\windows\system32\drivers\etc\hosts | |
# | |
# Block Skype ads | |
127.0.0.1 secure-sin.adnxs.com # On skype 7.* | |
127.0.0.1 *.adnxs.com # On skype 7.* | |
127.0.0.1 logi10.xiti.com # On skype 7.* | |
127.0.0.1 *.everesttech.net # On skype 7.* | |
127.0.0.1 pixel.everesttech.net # On skype 7.* | |
127.0.0.1 d.adroll.com # On skype 7.* |
#!/bin/sh | |
# the file containing this gist must be executable | |
# chmod +x FILENAME.sh | |
# xattr -d com.apple.quarantine FILENAME.sh | |
echo "Please login to your Apple Account through the Mac App Store" | |
echo "When logged in sucessfully press [ENTER} to continue" | |
read |
#!/usr/bin/env ruby -wKU | |
# | |
# by Kelan Champagne | |
# http://yeahrightkeller.com | |
# | |
# A script to generate a personal podcast feed, hosted on Dropbox | |
# | |
# Inspired by http://hints.macworld.com/article.php?story=20100421153627718 | |
# | |
# Simply put this, and some .mp3 or .m4a files in a sub-dir under your Dropbox |
#EXTM3U | |
#EXTINF:-1,Digitally Imported - Ambient | |
http://pub1.diforfree.org:8000/di_ambient_hi | |
#EXTINF:-1,Digitally Imported - Big Room House | |
http://pub1.diforfree.org:8000/di_bigroomhouse_hi | |
#EXTINF:-1,Digitally Imported - Breaks | |
http://pub1.diforfree.org:8000/di_breaks_hi |
# use ImageMagick convert | |
# the order is important. the density argument applies to input.pdf and resize and rotate to output.pdf | |
convert -density 90 input.pdf -rotate 0.5 -attenuate 0.2 +noise Multiplicative -colorspace Gray output.pdf |
#!/bin/sh | |
### | |
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
### | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
On my RetroPie machine I wanted a hardware volume knob — the games I play use a handful of emulators, and there's no unified software interface for controlling the volume. The speakers I got for my cabinet are great, but don't have their own hardware volume knob. So with a bunch of googling and trial and error, I figured out what I need to pull this off: a rotary encoder and a daemon that listens for the signals it sends.
A rotary encoder is like the standard potentiometer (i.e., analog volume knob) we all know, except (a) you can keep turning it in either direction for as long as you want, and thus (b) it talks to the RPi differently than a potentiometer would.
I picked up this one from Adafruit, but there are plenty others available. This rotary encoder also lets you push the knob in and treats that like a button press, so I figured that would be useful for toggling mute on and off.