Skip to content

Instantly share code, notes, and snippets.

View thewhodidthis's full-sized avatar
🔘

Sotiri Bakagiannis thewhodidthis

🔘
View GitHub Profile
@thewhodidthis
thewhodidthis / post-receive
Last active August 21, 2016 10:11
Git hook for git2html
# http://hssl.cs.jhu.edu/~neal/git2html/
./git2html.sh \
-p git2html \
-l http://hssl.cs.jhu.edu/~neal/git2html.git \
-r /home/neal/public_html/git2html.git
~/public_html/git2html/src/
./git2html.sh ~/public_html/git2html/src/
@thewhodidthis
thewhodidthis / diacritical.json
Created March 12, 2017 09:59
Diacritics ranges for decorating text glitchr style
{
"latin": [
33,
879
],
"basic ASCII": [
33,
127
],
"extended ASCII": [
@thewhodidthis
thewhodidthis / platform.md
Last active March 20, 2022 13:40
Progressives

ΟΙ ΠΡΟΟΔΕΥΤΙΚΟΙ

ΚΑΤΑΣΤΑΤΙΚΟ

ΑΘΗΝΑ 15 ΑΥΓΟΥΣΤΟΥ 2012

  1. ΠΡΟΛΟΓΟΣ
    Κάνοντας χρήση των δικαιωμάτων που κατοχυρώνει το Σύνταγμα, αποφασίσαμε στις 15 Αυγούστου 2012 το σχηματισμό των Προοδευτικών, πολιτικού κόμματος που θα υπηρετεί την ελεύθερη λειτουργία του δημοκρατικού πολιτεύματος σύμφωνα με το άρθρο 29 του νόμου 3023/2002, παρ. 1. Οι Προοδευτικοί πρεσβεύουν τις αρχές του ορθολογισμού, της ανεκτικότητας, της εργασίας, της αλληλεγγύης, της δημιουργικότητας, της ελεύθερης έκφρασης, της ανεξιθρησκείας, του διαλόγου και της συνεννόησης.

  2. ΚΟΜΜΑ

    1. Τίτλος
      Ιδρύεται πολιτικό κόμμα με τίτλο ΟΙ ΠΡΟΟΔΕΥΤΙΚΟΙ (αγγλ. THE PROGRESSIVES).
@thewhodidthis
thewhodidthis / gbtkn
Last active September 24, 2019 10:25
Get bearer token from twitter using curl
#!/bin/sh
source pass
curl -u $KEY:$SECRET --data 'grant_type=client_credentials' 'https://api.twitter.com/oauth2/token'
echo
@thewhodidthis
thewhodidthis / gstrp
Last active September 24, 2019 10:27
Batch remove mp3 meta tags using ffmpeg
#!/bin/bash
for f in *.mp3; do
ffmpeg -i "$f" -map 0:a -codec:a copy -map_metadata -1 "${f%.*}-out.mp3"
done
@thewhodidthis
thewhodidthis / gist:734b8eba4e809b89d3694bc45b608089
Last active September 24, 2019 09:58
Downsample images to 72dpi on macOS
sips *.jpg -s dpiHeight 72.0 -s dpiWidth 72.0
@thewhodidthis
thewhodidthis / ivory.terminal
Last active April 15, 2023 06:17
Material flavored Terminal.app theme
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ANSIBlackColor</key>
<data>
YnBsaXN0MDDUAQIDBAUGBwpYJHZlcnNpb25ZJGFyY2hpdmVyVCR0b3BYJG9iamVjdHMS
AAGGoF8QD05TS2V5ZWRBcmNoaXZlctEICVRyb290gAGrCwwXGBkeHygwMThVJG51bGzV
DQ4PEBESExQVFlYkY2xhc3NbTlNDb2xvck5hbWVcTlNDb2xvclNwYWNlXU5TQ2F0YWxv
Z05hbWVXTlNDb2xvcoAKgAMQBoACgARWU3lzdGVtXxAndW5lbXBoYXNpemVkU2VsZWN0
@thewhodidthis
thewhodidthis / com.thewhodidthis.dnsmasq.plist
Created June 30, 2019 19:54
Brew dnsmasq property list clone for pkgsrc, added user option
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.thewhodidthis.dnsmasq</string>
<key>ProgramArguments</key>
<array>
<string>/opt/pkg/sbin/dnsmasq</string>
<string>--keep-in-foreground</string>
@thewhodidthis
thewhodidthis / index.php
Last active January 5, 2021 23:03
Simple CORS bypass
<?php
$url = filter_input(INPUT_GET, 'url', FILTER_SANITIZE_URL) or exit;
// This allows for catching warnings eg. when offline, or `$url` resource missing
set_error_handler(
function ($severity, $message, $file, $line) {
if (error_reporting() & $severity) {
throw new ErrorException($message, 0, $severity, $file, $line);
}
@thewhodidthis
thewhodidthis / gloop
Created September 24, 2019 10:14
Turn mp4 video into animated gif using ffmpeg
#!/bin/sh
# Helps turn videos into gif loops
# Usage:
# ./gloop input.mp4 palette.png output.gif
# Reference:
# http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html
# Shortcut