- Objectives:
- Understand functional programming a bit better
- Categorize and understand approaches
- See which approaches fit which problems
- Map concepts and approaches from Scala/Haskell to elixir
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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
value: 'valore' | |
}); |
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
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
didInsertElement: function() { | |
let _this = this; | |
window.fetch('https://cors-test.appspot.com/test').then(function(data) { | |
data.json().then(function(v) { | |
console.log(v); | |
_this.set('content', v.status); | |
}); |
I hereby claim:
- I am ghedamat on github.
- I am ghedamat (https://keybase.io/ghedamat) on keybase.
- I have a public key whose fingerprint is 8771 BF7F 0FEE 3724 2FE4 9274 8B8F 0DD6 349B B04B
To claim this, I am signing this object:
These are instructions for booting from an Ubuntu liveCD and installing NixOS on a machine. I needed to do this because the NixOS liveCD doesn't work on my machine (NixOS/nixpkgs#5829), so I'm just using the Ubuntu installation media as something to boot into.
Much of this is from discussion at NixOS/nixpkgs#14680.
Get the Ubuntu ISO: http://releases.ubuntu.com/16.04.1/ubuntu-16.04.1-desktop-amd64.iso
Write it to a USB drive with unetbootin
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
# taken from https://github.com/NixOS/nix/issues/2925#issuecomment-539570232 | |
#1. Check if /nix exists. | |
# If not, run | |
echo 'nix' | sudo tee -a /etc/synthetic.conf | |
#then reboot. |
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
with (import (builtins.fetchTarball { | |
name = "nixos-20.03-2020-05-27"; # Descriptive name | |
url = | |
"https://github.com/nixos/nixpkgs-channels/archive/48723f48ab92381f0afd50143f38e45cf3080405.tar.gz"; | |
sha256 = "0h3b3l867j3ybdgimfn76lw7w6yjhszd5x02pq5827l659ihcf53"; | |
}) { }); | |
let | |
pkgs = import (builtins.fetchTarball { | |
name = "nixos-20.03-2020-05-27"; # Descriptive name | |
url = |
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
with import <nixpkgs> {}; | |
let | |
my-python-packages = python-packages: with python-packages; [ | |
pip | |
setuptools | |
]; | |
python-with-my-packages = pkgs.python3.withPackages my-python-packages; | |
# define packages to install with special handling for OSX |
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
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"net/http" | |
) |
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
import Controller from '@ember/controller'; | |
export default class ApplicationController extends Controller { | |
appName = 'Ember Twiddle'; | |
} |