This is my recommended path for learning Haskell.
This file contains hidden or 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
| ## The Problem | |
| Standard practices say no non-root process gets to talk to the Internet on a port less than 1024. How, then, could I get Node talking on port 80 on EC2? (I wanted it to go as fast as possible and use the smallest possible share of my teeny tiny little micro-instance's resources, so proxying through nginx or Apache seemed suboptimal.) | |
| ## The temptingly easy but ultimately wrong solution: | |
| Alter the port the script talks to from 8000 to 80: | |
| }).listen(80); |
This file contains hidden or 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
| FROM base | |
| MAINTAINER Brian L. Troutwine "[email protected]" | |
| RUN apt-get update | |
| RUN apt-get install -y curl | |
| RUN curl -O https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb | |
| RUN dpkg -i erlang-solutions_1.0_all.deb | |
| RUN apt-get update |
This file contains hidden or 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
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
This file contains hidden or 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
| # in /usr/share/xsessions | |
| [Desktop Entry] | |
| Name=Xmonad GNOME | |
| Comment=Tiling window manager | |
| TryExec=/usr/bin/gnome-session | |
| Exec=gnome-session --session=xmonad | |
| Type=XSession |
NOTE: 534 stars, 106 forks. I love you all. Please contribute tips and edits back to this cheat sheet -- email's [email protected] and you can treat gists like git repositories and send git diffs.
This file contains hidden or 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
| # First run: | |
| apt-get install apt-cacher python-vm-builder | |
| vi /etc/default/apt-cacher # ensure autostart is enabled | |
| sudo service apt-cacher start | |
| git clone git://github.com/bitcoin/bitcoin.git | |
| git clone git://github.com/devrandom/gitian-builder.git | |
| mkdir gitian-builder/inputs | |
| wget 'http://miniupnp.tuxfamily.org/files/download.php?file=miniupnpc-1.5.tar.gz' -O gitian-builder/inputs/miniupnpc-1.5.tar.gz | |
| wget 'http://downloads.sourceforge.net/project/wxwindows/2.9.1/wxWidgets-2.9.1.tar.bz2' -O gitian-builder/inputs/wxWidgets-2.9.1.tar.bz2 |
This file contains hidden or 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 | |
| # | |
| # NixOS install script synthesized from: | |
| # | |
| # - Erase Your Darlings (https://grahamc.com/blog/erase-your-darlings) | |
| # - ZFS Datasets for NixOS (https://grahamc.com/blog/nixos-on-zfs) | |
| # - NixOS Manual (https://nixos.org/nixos/manual/) | |
| # | |
| # It expects the name of the block device (e.g. 'sda') to partition |
This file contains hidden or 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 | |
| # NixOS install with encrypted root and swap | |
| # | |
| # sda | |
| # ├─sda1 BOOT | |
| # └─sda2 LINUX (LUKS CONTAINER) | |
| # └─cryptroot LUKS MAPPER | |
| # └─cryptroot1 SWAP | |
| # └─cryptroot2 ZFS |