Skip to content

Instantly share code, notes, and snippets.

View lindhe's full-sized avatar
🦥

Andreas Lindhé lindhe

🦥
View GitHub Profile
{"advancedControlPanel":true,"ACP_dogeButtons":false,"ACP_smileys":false,"ACP_specialChars":true,"ACP_usefulLinks":true,"ACP_quickLinks":true,"ACP_colorPalette":true,"addAEMUnloadConfirmation":true,"removeLastNewline":true,"autofocusTA":true,"removeMobileSiteDisclaimer":true,"autofocusPMSubject":true,"betterPaginationButtons":true,"highlightUnreadPMs":true,"addPMLinks":true,"quoteSignatureButtons":false,"fixAdHeight":true,"DOMOperationsDuringPageLoad":true,"enableFilter":true,"preventAccidentalSignout":true,"dogeInQuoteFix":true,"searchWithGoogle":true,"openImagesInNewTab":false,"enableFavoriteLinks":true,"darkThemeByBlargmode":true,"darkThemeCache":false,"textareaHeight":"360","largerTextareaHeight":"720","quoteSignatureTip":"Så, nu kvarstår trådens värde även när du byter signatur, så att andra lättare kan lösa samma problem i framtiden. Posta alltid specs i klartext i trådstarten, om de är relevanta. :)","uninterestingForumsRaw":"[]","favoriteLinksRaw":"### Better SweClockers\n Inställningar för Better S
@lindhe
lindhe / confirmation.gs
Created May 13, 2017 20:08
Automatic email confirmation for Google Forms
function confirmation(e){
const TIME = 0;
const NAME = 1;
const EMAIL = 2;
var userName = e.values[NAME];
var userEmail = e.values[EMAIL];
var subject = "Form Submitted";
var message = "Thank you," + userName + "for registering!";
MailApp.sendEmail (userEmail, subject, message);
@lindhe
lindhe / Validity90-prototype_2273db1
Created June 11, 2017 12:08
Output from reverse engineered diver for finger print reader
Prototype version 7
Found device 138a:0097
This device is not supported, but lets try anyway
[C]
Index 1, size 12
0000 66 30 64 66 38 63 65 64 35 34 32 36
usb write:
0000 01
usb read:
0000 00 00 f0 b0 5e 54 a4 00 00 00 06 07 01 30 00 01
@lindhe
lindhe / Validity90-prototype_e9dd5ba
Created June 12, 2017 20:04
Output from reverse engineered diver for finger print reader
Prototype version 10
Found device 138a:0097
This device is not supported, but lets try anyway
Index 1, size 12
0000 66 30 64 66 38 63 65 64 35 34 32 36
usb write:
0000 01
usb read:
0000 00 00 f0 b0 5e 54 a4 00 00 00 06 07 01 30 00 01
@lindhe
lindhe / check_network_before_backup.sh
Last active July 2, 2017 17:56
Checks for authorized Wi-Fi SSID or connected Ethernet before performing backup.
#!/bin/bash
# Checks for authorized Wi-Fi SSID or connected Ethernet before performing
# backup.
RUN=false;
AUTHFILE=~/.config/authorized_netwoks.txt;
WIFI=$(iwgetid --raw);
ETH_IF=eth0;
ETH=$(ip link show $ETH_IF | perl -n -e'/state (\w+)/ && print $1');
@lindhe
lindhe / gist:11fb9c4c5f4ee29e3ece1ab4181bb8ba
Created July 7, 2017 14:17
The mighty "arrange all photos in new corresponding direcotires" one liner
find . -type f -print | perl -ne '/(.*IMG_(\d{4})(\d{2})(\d{2}).*)/ && print `mkdir -p $2/$2-$3/$2-$3-$4; mv $1 $2/$2-$3/$2-$3-$4`'
@lindhe
lindhe / vimfx.conf
Last active July 21, 2017 15:04
VimFX laptop.home 2017-07-21
{
"prevent_autofocus": true,
"blacklist": "*example.com* *192.168.0.112:8006* *docs.google.com/* http://www.foddy.net/Athletics.html https://2017game.picoctf.com/game/*",
"hints.chars": "asdfjklweio nv",
"mode.normal.copy_current_url": "Y yy",
"mode.normal.go_home": "",
"mode.normal.history_back": "L s",
"mode.normal.history_forward": "Ö d",
"mode.normal.stop": "",
"mode.normal.scroll_right": "",
@lindhe
lindhe / dark-ritch-text-fastmail.css
Created August 2, 2017 22:00
Override ritch text white background on Fastmiail (Stylish Userstyle CSS)
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document domain("www.fastmail.com") {
.v-Message-body--html {
border-color: transparent !important;
background-color: transparent !important;
}
.v-Message-body--html p {
color: #fff !important;
}
@lindhe
lindhe / email.sh
Created December 21, 2017 18:17
Send an email via cli
echo "message" | mail -s "Subject line" email@example.com
@lindhe
lindhe / keybase.md
Created March 17, 2018 10:41
My keybase.io proof

Keybase proof

I hereby claim:

  • I am lindhe on github.
  • I am lindhe (https://keybase.io/lindhe) on keybase.
  • I have a public key whose fingerprint is 4EEE CFA0 147F 7121 5C72 CF2E 34C1 4B69 96D5 B89E

To claim this, I am signing this object: