Skip to content

Instantly share code, notes, and snippets.

@AdamGerthel
AdamGerthel / index.js
Created July 16, 2019 11:55
Tinder data funnel script (node.js)
/*
* Node.js helper script for creating a SankeyMATIC funnel
*
* Step 1: Request Tinder from https://account.gotinder.com/data
* Step 2: Wait for your data
* Step 3: Place the data.json file from your data folder next to this script
* Step 4: Run the script: `$ node index.js`
* Step 5: Copy and paste the console output here: http://sankeymatic.com/build/
*/
@AdamGerthel
AdamGerthel / gobullar.md
Last active January 13, 2020 14:15
Bratts goa bullar

Gobullar för två

  • 10g jäst
  • 2 dl kallt vatten
  • 0,5 dl havregryn
  • 0,5 dl solrosfrö
  • 1/2 tsk salt
  • 2,75 dl vetemjöl

På kvällen

Rör ut jästen i det kalla vattnet. Tillsätt salt, socker, gryn och solrosfrö.

@AdamGerthel
AdamGerthel / vigos.md
Last active November 19, 2019 18:39
Vigos (a.k.a vegetarian Bigos)

Bigos är något av det bästa med Polen, möjligen i tät kamp med Żubrówka. Det är en traditionell jägargryta i sann östeuropeisk anda: Kött och kål.

Men - förtrösta inte, det går att göra en god Bigos, eller kanske då Vigos, helt utan kött. Veganskt rentav.

OBS: Receptet inkluderar bara själva grytan. Den ätes bäst till potatismos (fet o fin med massa upphettad iMat, vitpeppar o salt i) eller till lämplig pasta som tagliatelle, papardelle eller rigatoni. Kan även ätas as-is med bröd.

Tillagningstid: 90 minuter (dock blir den som bästa om den får vila i ett par dagar innan den äts)

Ingredienser (8 pers)

  • Surkål, t.ex. 1 burk Druvan 810g "Surkål i vitt vin" eller motsvarande
@AdamGerthel
AdamGerthel / ocr.php
Created December 3, 2014 17:21
Generate BankGiro/PlusGiro OCR numbers via PHP
<?php
/**
* OCR Number generation function
*
* @param string $base_number
* The base number that you wish to use for the OCR nr. Can be any number,
* but usually consists of client ID combined with invoice ID or similar.
* @param boolean $length
* Use length if you want the OCR number to add a length
@AdamGerthel
AdamGerthel / napoletana.md
Last active October 14, 2019 10:11
Pizza Napoletana

Pizzadeg för två hungriga (alternativt med lite rester över):

  • 5 dl mjöl (proteinrikt: "special" eller italienskt "00")
  • 12g salt (2/3 matsked)
  • 10g jäst
  • 2,5 dl ljummet vatten

Tillagningstid: 15 min Väntetid: 1-3 dagar

@AdamGerthel
AdamGerthel / aldente.md
Last active July 17, 2019 14:34
Bolognese a'la Adam

4-6 personer

Ingredienser

  • 2 burkar hela tomater
  • 1/2 Selleri
  • Små champinjoner
  • Ett stycke pancetta eller rökt sidfläsk
  • 1 kg nötfärs
  • 1 dl rödvin
  • Ett par skopor tomatpuré
@AdamGerthel
AdamGerthel / hex-to-rgba.js
Last active May 11, 2019 18:46
Hex to RGBa (Javascript)
const hexToRgbA = (hex, alpha = 1) => {
let c
if (/^#([A-Fa-f0-9]{3}){1,2}$/.test(hex)) {
c = hex.substring(1).split('')
if (c.length== 3) {
c = [c[0], c[0], c[1], c[1], c[2], c[2]]
}
@AdamGerthel
AdamGerthel / senapskålspesto.md
Last active January 24, 2018 11:33
Pesto Cavolo di Senape

En trevlig liten ruccolapesto/röra som dessutom är helt vegansk och väldigt näringsrik.

  • 6 dl ruccola
  • 1,5 dl olivolja
  • 4 matskedar näringsjäst (nutritional yeast)
  • 3 dl cashewnötter
  • 1 Vitlöksklyfta (pressad)
  • 4 tsk salt

Lägg nötterna i en kastrull och täck med vatten. Koka dem i ca. 10 minuter tills de mjuknat.

@AdamGerthel
AdamGerthel / localstorage.html
Last active April 15, 2017 21:07
Local Storage example
<!doctype html>
<html>
<head>
<title>Local Storage Demo</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script src="https://code.jquery.com/jquery-1.11.0.min.js"></script>
<style>
body {
font-family: arial;
}
@AdamGerthel
AdamGerthel / rpaf.ini
Last active December 21, 2015 00:18
Apache mod_rpaf configuration used in combination with Varnish. When using Varnish the $SERVER variable remote_addr is set to the Varnish server IP instead of the client ip (site visitor). If Varnish is configured to send X-Forwarded-For headers containing the client IP, then mod_rpaf can use that information and set remote_addr to the client IP…
<IfModule rpaf_module>
RPAFenable On
# When enabled, take the incoming X-Host header and
# update the virtualhost settings accordingly:
RPAFsethostname On
# Define which IP's are your frontend proxies that sends
# the correct X-Forwarded-For headers:
RPAFproxy_ips 123.123.123.123 10.0.0.2 127.0.0.1