Skip to content

Instantly share code, notes, and snippets.

@dslusser
dslusser / README.md
Created July 1, 2017 14:03 — forked from hofmannsven/README.md
My simply Raspberry Pi Cheatsheet
@dslusser
dslusser / README.md
Created October 20, 2016 17:51 — forked from jonathantneal/README.md
Local SSL websites on macOS Sierra

Local SSL websites on macOS Sierra

These instructions will guide you through the process of setting up local, trusted websites on your own computer.

These instructions are intended to be used on macOS Sierra, but they have been known to work in El Capitan, Yosemite, Mavericks, and Mountain Lion.

NOTE: You may substitute the edit command for nano, vim, or whatever the editor of your choice is. Personally, I forward the edit command to Sublime Text:

alias edit="/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl"
@dslusser
dslusser / periscope.sh
Last active September 16, 2015 10:21 — forked from dardo82/periscope.sh
Save Periscope Videos
#!/bin/sh
mkdir -v periscope; cd periscope; echo $PWD
TOKEN=${1##*/}; echo $TOKEN
curl -v "https://api.periscope.tv/api/v2/getAccessPublic?token=${TOKEN//=/%3D}" | json > periscope.json
M3U8=$(awk -F\" /replay/'{print $4}' periscope.json); echo $M3U8
COOKIE="Cookie: $(awk -F'"' -v ORS="" /CloudFront/'{print $4"="; getline; print $4"; "}' periscope.json)"
curl -v -O -H "$COOKIE" "${M3U8}"
FIRST=$(awk -F'[_.]' '/chunk/{print $2;exit}' playlist.m3u8); echo chunk_$FIRST.ts
LAST=$(awk -F'[_.]' '/chunk/{num=$2}END{print num}' playlist.m3u8); echo chunk_$LAST.ts
curl -v -O -H "$COOKIE" "${M3U8%/*}/chunk_[$FIRST-$LAST].ts"
[
{
"action": {
"type": "block"
},
"trigger": {
"url-filter": ".*",
"resource-type": ["script"],
"load-type": ["third-party"],
"if-domain": ["imore.com"]