This is a simplified version Masatoshi Nishiguchi's bmp280.livemd
notebook that's
included in Nerves Livebook. Check out that notebook if you'd like to try this out yourself.
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
# OLED | |
```elixir | |
Mix.install([ | |
:oled, | |
:chisel | |
]) | |
``` | |
## Basic setup |
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
#!/bin/bash | |
# case "$1" in | |
# start) | |
# start | |
# ;; | |
# stop) | |
# stop | |
# ;; | |
# status) |
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
sudo dpkg --add-architecture i386; sudo apt update; sudo apt install mailutils postfix curl wget file tar bzip2 gzip unzip bsdmainutils python util-linux ca-certificates binutils bc jq tmux lib32gcc1 libstdc++6 libstdc++6:i386 | |
wget -O linuxgsm.sh https://linuxgsm.sh && chmod +x linuxgsm.sh && bash linuxgsm.sh csgoserver | |
./csgoserver auto-install | |
echo "This script uses these environment variables \n that are to be set by the user: " | |
echo "- LGSM_SERVER_IP" | |
echo "- RCON_PASSWORD" | |
echo "- GSLT_TOKEN" | |
echo "- CSGO_SERVER_PASSWORD" |
In this article we will be looking at a concept in FP called functor.
A functor might sound very strange and esoteric but chances are you have used it in some ways. Some of you probably a lot! In this article we will look at what they are and some reasons they are usefull.
Lets start with a definition of a functor and then try to make sense of it. This will not be a comprehensive explanation and we will be glossing over some details for in the interest of brevity but it will hopefully be enough you get you started.
"A functor is a structure with one (or more) values in it that has a function that can transform the value".
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
require "date" | |
require "json" | |
def log_to_hash | |
commits = [] | |
res = %x(git log --date=iso --pretty=format:'{\"short_hash\":\"%h\",\"name\":\"%an\",\"email\":\"%ae\",\"date\":\"%ad\",\"subject\":\"%s\"}') | |
res.each_line do |line| | |
commits << JSON.parse(line, {symbolize_names: true}) | |
end | |
return commits |
I hereby claim:
- I am ringvold on github.
- I am ringvold (https://keybase.io/ringvold) on keybase.
- I have a public key ASBr7yMRZ7vDDOxC0D8MgpPMJiGvo8HqoUQFCLDN0NEatAo
To claim this, I am signing this object:
I hereby claim:
- I am haraldringvold on github.
- I am haraldringvold (https://keybase.io/haraldringvold) on keybase.
- I have a public key whose fingerprint is EC28 0A40 44BD 2EFF 5E9F 4454 61A6 FFD7 A33A 08EF
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
/* Foundation 5 Revised Grid + custom push/pull resets */ | |
.row { | |
margin-left: auto; | |
margin-right: auto; | |
margin-top: 0; | |
margin-bottom: 0; | |
max-width: 62.5em; | |
width: 100%; | |
*zoom: 1; } | |
.row:before, .row:after { |
NewerOlder