Bartosz Milewski - Category Theory
https://www.youtube.com/watch?v=I8LbkfSSR58&list=PLbgaMIhjbmEnaH_LTkxLI7FMa2HsnawM_
| PS1="\A\w $ " | |
| alias code='/Applications/Visual\ Studio\ Code.app/Contents/Resources/app/bin/code' |
| readonly THEME='sky' | |
| readonly PIC_PATH='/home/'"$USER"'/Pictures/Unsplash/' | |
| readonly PIC_FILE=''"$PIC_PATH"'today.jpeg' | |
| setupDirectory() { | |
| mkdir -p $PIC_PATH | |
| } | |
| downloadToday() { | |
| local RES=$(xdpyinfo | awk '/dimensions/{print $2}') |
| ## auto-upgrades | |
| sudo apt install unattended-upgrades | |
| # remove trash icon from desktop & add tweak ui (i.e. activities overview hot corner) | |
| gsettings set org.gnome.nautilus.desktop trash-icon-visible false | |
| #sudo apt-get install gnome-tweak-tool | |
| ## red shift | |
| gsettings set org.gnome.settings-daemon.plugins.color night-light-enabled true |
| # Delete | |
| slice() { | |
| if [ $# -eq 0 ] | |
| then | |
| echo "No arguments supplied" | |
| else | |
| read -p "Sure you want to : shred -vzu $1? " -n 1 -r | |
| echo # (optional) move to a new line | |
| if [[ $REPLY =~ ^[Yy]$ ]] | |
| then |
| <!DOCTYPE html> | |
| <html> | |
| <body> | |
| <div id="container" style="padding: 20px; border: 1px dashed grey;"> | |
| <div>Don't replace this.</div> | |
| <custom-button></custom-button> | |
| <div>Don't replace this either.</div> | |
| </div> |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| <!DOCTYPE html> | |
| <html> | |
| <body> | |
| <p>Finding the sum of numbers.</p> | |
| <p>Sum() returns <span id="demo-no-arguments"></span></p> | |
| <p>Sum(32) returns <span id="demo-32"></span></p> | |
| <p>Sum(1,2,3,4,5) returns <span id="demo-1-to-5"></span></p> | |
| <script> |
| type Color = Red | Green | Ivory | Yellow | Blue | |
| type Nation = England | Spain | Ukrane | Norway | Japan | |
| type Pet = Dog | Snail | Fox | Horse | Zebra | |
| type Drink = Coffee | Tea | Milk | Juice | Water | |
| type Smoke = OldGold | Kools | Chester | Lucky | Parliaments | |
| // who drinks water? who owns the zebra ? | |
| type House = {color: Color; nation: Nation; pet: Pet; drink: Drink; smoke: Smoke} |
| // Add NuGet package FSharp.Data | |
| #r "../packages/FSharp.Data.2.3.2/lib/net40/FSharp.Data.dll" //#r is needed in .fsx file. You can omit this line in .fs file. | |
| open FSharp.Data | |
| let apiUrl = "http://swapi.co/api/people/?format=json" | |
| type People = JsonProvider<"http://swapi.co/api/people/?format=json"> | |
| type Planet = JsonProvider<"http://swapi.co/api/planets/1/"> // * planet was found by inspecting.... | |
| // assumption made, all planets have the same json structure/properties as planet #1 |