openpgp4fpr:95842ddb8603ebd879cb90c5d0ea677fd93a75bc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule SecretSanta do | |
@participants [:andrei, :dave, :john, :mary, :jane, :anna] | |
def get_random, do: generate_pairs() |> Enum.random() | |
defp generate_pairs(givers \\ @participants, receivers \\ @participants, existing_pairs \\ []) | |
defp generate_pairs([giver | givers], receivers, existing_pairs) do | |
for receiver <- receivers, | |
valid_pair?(giver, receiver, existing_pairs), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"features": { | |
"copilot": false | |
}, | |
"theme": "One Light", | |
"buffer_font_size": 13, | |
"buffer_font_family": "MonoLisa Custom", | |
"tab_size": 2, | |
"language_overrides": { | |
"Elixir": { |
I hereby claim:
- I am andreicek on github.
- I am 0x7f (https://keybase.io/0x7f) on keybase.
- I have a public key ASChxzjMOAKEDR0OJMljBd0P_wcK_My7zJgL-YStC5dWWAo
To claim this, I am signing this object:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
version: "2.1" | |
services: | |
wireguard: | |
image: linuxserver/wireguard | |
container_name: wireguard | |
cap_add: | |
- NET_ADMIN | |
- SYS_MODULE | |
environment: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
musicFolder=$1 | |
dist=$2 | |
function usage() { | |
echo $1 | |
exit 1 | |
} |
Imagine a world where your state management has less boilerplate and code that is both easier to understand and faster to write. And now imagine that it's as scalable as insert your library here. This talk shows you that not only frameworks benefit from a functional and straightforward state management solution.
The talk will focus on the ideas of MobX and how the library works (a simple pub-sub implementation) instead of on focusing on React and integration with React or any other framework.
ToC:
- what is state management
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs'); | |
const {spawn} = require('child_process'); | |
function read() { | |
return new Promise((resolve) => { | |
fs.readFile('./pass.csv', 'UTF-8', (_, data) => resolve(data)); | |
}); | |
} | |
function objectify(item) { |
NewerOlder