Skip to content

Instantly share code, notes, and snippets.

View PMK's full-sized avatar

PMK PMK

View GitHub Profile
@dsbaars
dsbaars / show-tor-urls.sh
Last active January 14, 2022 21:58
Show all onion URLs of Umbrel apps
RED=`tput setaf 1`
GREEN=`tput setaf 2`
NC=`tput sgr0`
for hostnameFile in $(find ~/umbrel/tor/data/app* -name 'hostname' | sort) ; do
APPNAME=$(echo ${hostnameFile} | cut -d/ -f 7-7)
HOSTNAME=$(cat ${hostnameFile})
printf "%-40s" ${RED}${APPNAME}
printf "%s" ${GREEN}${HOSTNAME}
printf "${NC}\n"
@sekcompsci
sekcompsci / Comparison Espressif ESP MCUs.md
Created June 18, 2021 03:56 — forked from fabianoriccardi/Comparison Espressif ESP MCUs.md
Comparison table for ESP8266/ESP32/ESP32-S2/ESP32-S3/ESP32-C3/ESP32-C6

Comparison table for ESP8266/ESP32/ESP32-S2/ESP32-S3/ESP32-C3/ESP32-C6

A minimal table to compare the Espressif's MCU families.

ESP8266 ESP32 ESP32-S2 ESP32-S3 ESP32-C3 ESP32-C6
Announcement Date 2014, August 2016, September 2019, September 2020, December
@PMK
PMK / _negative-border-radius.scss
Created November 1, 2018 15:59
Handy SCSS utils
// Creates a "negative border-radius"
//
// Author: PMK
// License: MIT
@mixin negative-border-radius($color: #000, $contrast: transparent, $position: all, $size: 1rem) {
background-repeat: no-repeat;
@if $position == all {
background:
radial-gradient(circle at 0 100%, $contrast $size, $color $size),
@PMK
PMK / convertMp4ToMp3.sh
Last active May 19, 2018 14:07
Convert mp4 to mp3 with faad and lame
#!/bin/bash
function convertMp4ToMp3 { faad -q -w -f 2 "$1" | lame --quiet -r -h -b 320 - "${1%.mp4}.mp3"; }
@pachacamac
pachacamac / svg-creator-tool.html
Last active October 7, 2016 00:04
simple as fuck svg creator
<!DOCTYPE html>
<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>SVG Helper Tool</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<p>click and drag on the canvas ... you're making a polygon ... <button id="reset">reset</button><button id="undo">undo</button></p>
<canvas id="x" width="500" height="500" style="border: 1px solid black;"></canvas>
@PMK
PMK / backup_firefox.sh
Created April 4, 2016 08:48
Mozilla Firefox profile (w/ bookmarks, history and addons) backup Bash script for Mac OS X
#!/bin/bash
#####
# Created by PMK
# https://github.com/PMK
#
# License: Public Domain
#
# Creates a tar archive of the current active profile of Mozilla Firefox.
# The profile contains sessions, addons, bookmarks and history.
@spiderneo
spiderneo / le-renew-webroot
Last active July 6, 2016 06:27 — forked from thisismitch/le-renew-webroot
Let's Encrypt Auto-Renewal using the Webroot Plugin (Nginx)
#!/bin/bash
web_service='nginx'
FILES=/usr/local/etc/letsencrypt/*.ini
for f in $FILES
do
echo "Renewing for $f file..."
config_file="$f"
@PMK
PMK / bookmarklet.js
Last active September 8, 2015 15:05
Plug.dj "auto woot" bookmarklet. Install instructions: http://alturl.com/gfhzv. When you change rooms, you need to re-enable it.
javascript:(function(){window.API.on(window.API.HISTORY_UPDATE,function(){setTimeout(function(){window.jQuery("#woot").click();},1000);});window.onbeforeunload=function(){window.API.off(window.API.HISTORY_UPDATE);};}());
@liamcurry
liamcurry / gist:2597326
Created May 4, 2012 19:56
Vanilla JS vs jQuery

Moving from jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})