Skip to content

Instantly share code, notes, and snippets.

View lindhe's full-sized avatar
🦥

Andreas Lindhé lindhe

🦥
View GitHub Profile
@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 / dateHelpers.gs
Last active January 5, 2019 21:02
Google Scripts form email helper functions
// -*- coding: utf-8 -*-
// vim: syntax=javascript tabstop=2
function nothing() {
// Triggers don't like files with no named function.
Logger.log("Nothing happened.\n");
};
Date.prototype.getWeekNumber = function() {
// http://stackoverflow.com/questions/6117814/get-week-of-year-in-javascript-like-in-php
@lindhe
lindhe / patch.md
Last active September 13, 2021 08:03
Guide to git patches

Guide to sending Git repos and patches

$ git bundle create /tmp/foo-all --all (http://stackoverflow.com/a/2545784/893211)

Andreas Lindhé, [03.03.17 20:08]

  1. Ladda ned repo.git filen.
  2. git clone repo.git git_is_cool
  3. Redan detta är coolt. Jag skickade just en komprimerad variant av ett git-repo, och du klonade från det repot.
  4. Ladda ned patch.diff filen.
@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 / ErgoDox-EZ-Svorak-A1.kbd.json
Last active November 17, 2018 19:54
ErgoDox EZ Svorak A1
[
{
"name": "ErgoDox EZ Svorak A1",
"author": "Andreas Lindhé",
"switchMount": "cherry",
"switchBrand": "gateron",
"switchType": "KS-3-Green"
},
[
{
{"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 / Vimium configuration
Last active January 16, 2022 11:39
This are my current Vimium maps
unmapAll
map ? showHelp
# Scrolling:
map j scrollDown
map k scrollUp
map gg scrollToTop
map G scrollToBottom
map gl scrollToLeft