View .gitignore
*.dat
*.png
*.txt
pcsensor-temper
View background.js
function open(url, tabId) {
console.log(`vlc://${url}`);
// Open a new tab to start the prompt
chrome.tabs.create({url: `vlc://${url}`}, function(newtab) {
// Focus the old tab
chrome.tabs.update(tabId, {active: true});
// You have 10 seconds to click the button
// If the tab is closed too soon, the button no longer works :(
setTimeout(function(){
View main.js
if (document.body.children.length == 1 && document.body.children[0].tagName == "VIDEO") {
document.body.children[0].style.width = "100%";
}
View altdrag-toggle.ahk
; Press Ctrl+Alt+A to toggle AltDrag
; 0x111 = WM_COMMAND
; 0x8000+1 = SWM_TOGGLE https://github.com/stefansundin/altdrag/blob/8547fc8ea13829af712586558851b9ed50ae23e8/altdrag.c#L27
DetectHiddenWindows, on
^!a::
SendMessage, 0x111, 0x8000+1, 0,, ahk_class AltDrag
return
View download-slack-emoji.sh
#!/bin/bash
# get a token from https://api.slack.com/custom-integrations/legacy-tokens
# or if you don't have permissions to create one, you can inspect the Slack web client and you can get the one it is using
SLACK_TOKEN=
curl -q -s "https://slack.com/api/emoji.list?token=$SLACK_TOKEN" | jq -Mr '.emoji | to_entries | .[] | select(.value | startswith("http")) | "\(.key) \(.value)"' | sort | while read name url; do
fn="$name.${url##*.}"
echo "$fn"
curl -q -s -o "$fn" "$url"
done
View .gitignore
*.tsv
*.gz
*.dat
*.png
*.json
View heroku-replay.sh
#!/bin/bash -e
app=rssbox
dev=http://rssbox.dev
heroku logs -t -s heroku -d router -a $app | {
while IFS= read -r line
do
path=$(echo $line | grep -oE 'path="([^"]+)"' | cut -d'"' -f2)
code=$(curl -s -o /dev/null -w "%{http_code}" "$dev$path")
View openssh-7.3.sh
$ ssh -V
OpenSSH_7.2p2 Ubuntu-4ubuntu2.1, OpenSSL 1.0.2g 1 Mar 2016
$ wget https://launchpadlibrarian.net/277739251/openssh-client_7.3p1-1_amd64.deb
$ wget https://launchpadlibrarian.net/298453050/libgssapi-krb5-2_1.14.3+dfsg-2ubuntu1_amd64.deb
$ wget https://launchpadlibrarian.net/298453058/libkrb5-3_1.14.3+dfsg-2ubuntu1_amd64.deb
$ wget https://launchpadlibrarian.net/298453060/libkrb5support0_1.14.3+dfsg-2ubuntu1_amd64.deb
$ sudo dpkg -i libkrb5support0_1.14.3+dfsg-2ubuntu1_amd64.deb
$ sudo dpkg -i libkrb5-3_1.14.3+dfsg-2ubuntu1_amd64.deb
$ sudo dpkg -i libgssapi-krb5-2_1.14.3+dfsg-2ubuntu1_amd64.deb
$ sudo dpkg -i openssh-client_7.3p1-1_amd64.deb
View manifest.json
{
"name": "Wistia auto-speed",
"version": "1.0",
"description": "Automatically speed up Wistia embeds to 1.5x, and select the best quality.",
"content_scripts": [
{
"matches": [
"*://*.wistia.com/medias/*",
"*://fast.wistia.net/embed/iframe/*"
],
View manifest.json
{
"name": "TED YouTube embed",
"version": "1.0",
"description": "Replace the TED player with the equivalent YouTube video.",
"content_scripts": [
{
"matches": ["*://www.ted.com/talks/*"],
"js": ["replace.js"],
"run_at": "document_end"
}