Skip to content

Instantly share code, notes, and snippets.

View noestreich's full-sized avatar

noestreich

  • Berlin
View GitHub Profile
#!/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
@andyrbell
andyrbell / scanner.sh
Last active April 5, 2024 09:01
Make a pdf look scanned using ImageMagick
# 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
@joielechong
joielechong / hosts
Last active February 2, 2022 23:29 — forked from eyecatchup/hosts
Disable Skype ads: 1.) Add hosts to your hosts file 2.) Flush DNS resolver cache (ipconfig /flushdns)
# 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.*
@savetheclocktower
savetheclocktower / README.md
Last active May 5, 2024 19:44
Using a rotary encoder as a volume control for the Raspberry Pi

Using a rotary encoder as a volume control

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.

Rotary encoder

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.

@sim642
sim642 / DI.m3u
Created July 5, 2015 12:52
Digitally Imported premium streams
#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
@raphaelz
raphaelz / grab-screenshots.php
Created April 22, 2015 18:26
Grab Apple Watch screenshots for apps using iTunes URL. Inspired by @stroughtonsmith
<?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);
@patriciogonzalezvivo
patriciogonzalezvivo / rpi.md
Last active March 25, 2018 09:28
RaspberryPi post-installation

THE BASIC

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install avahi-daemon 

Apache Server

@dergachev
dergachev / GIF-Screencast-OSX.md
Last active May 2, 2024 05:55
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@brandonb927
brandonb927 / osx-for-hackers.sh
Last active May 5, 2024 13:30
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/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
@adamawolf
adamawolf / Apple_mobile_device_types.txt
Last active May 6, 2024 09:56
List of Apple's mobile device codes types a.k.a. machine ids (e.g. `iPhone1,1`, `Watch1,1`, etc.) and their matching product names
i386 : iPhone Simulator
x86_64 : iPhone Simulator
arm64 : iPhone Simulator
iPhone1,1 : iPhone
iPhone1,2 : iPhone 3G
iPhone2,1 : iPhone 3GS
iPhone3,1 : iPhone 4
iPhone3,2 : iPhone 4 GSM Rev A
iPhone3,3 : iPhone 4 CDMA
iPhone4,1 : iPhone 4S