Skip to content

Instantly share code, notes, and snippets.

@joakin
joakin / habits.md
Created July 14, 2020 11:08
Making & breaking habits

From "Atomic Habits"

4 stages of performing habits

  1. Cue
  2. Craving
  3. Response
  4. Reward

4 laws to make or break behaviors

@joakin
joakin / Hey.md
Created July 3, 2020 10:26
Hey email workflow

Email workflow:

Hey

  • Imbox
    • Unseen
    • Seen
  • Feed
  • Paper trail
  • Reply later
@joakin
joakin / ResponsiveVector.css
Created April 30, 2020 17:27
Responsive vector user style
textarea { font-size: 1em; }
.skin-vector #content>* {
max-width: 800px;
margin-left: auto;
margin-right: auto;
}
@media (max-width: 768px) {
/* Make it flex to change the order of the menus to the top */
@joakin
joakin / wikipedia-multi-language-web-application.md
Created August 26, 2019 12:16
WP PWA - My tries over the years

2015

I wasn't able to get support for pursuing this so I tried to prepare more information and a more serious project that end of year and start in 2016.

2016

@joakin
joakin / mobile-html-wrapper.html
Created August 21, 2019 16:33
PCS mobile-html HTML file wrapping with an iframe
<!DOCTYPE html>
<html>
<head>
<style>
html,
body {
margin: 0;
padding: 0;
}
body {
@joakin
joakin / parallel.sh
Created August 12, 2019 11:15
Parallel killable bash jobs
#!/bin/bash
trap "exit" INT TERM ERR
trap "kill 0" EXIT
./someProcessA &
./someProcessB &
wait
@joakin
joakin / Type inference.md
Created July 21, 2019 07:49
Type inference lecture notes
@joakin
joakin / MapAndFoldBenchmark.elm
Created July 15, 2019 14:06
Mapping and making lists Benchmark
mapList =
let
xs =
List.range 0 1000 |> List.map (always 0)
in
benchmark "List.map"
(\_ ->
xs |> List.map (always 1)
@joakin
joakin / Benchmark.elm
Created July 15, 2019 08:38
Elm associative data structures benchmark
updateRecord =
benchmark "Update record with native syntax"
(\_ ->
let
surname =
emptyRecord.surname
in
{ emptyRecord | surname = surname ++ "wat" }
)
@joakin
joakin / how-to-use-x-at-work.md
Last active February 12, 2019 11:45
How to use X at work

How to Use X at Work

Adapted from the wonderful original post: How to Use Elm at Work by Evan Czaplicki / 11 July 2016

Removed some Elm specific parts, and made Elm generic as X.

Trying X in some big JavaScript project is not very hard. Why try X like this? Well, tons of folks are trying out X these days, and as they share their