Backstory: I decided to crowdsource static site generator recommendations, so the following are actual real world suggested-to-me results. I then took those and sorted them by language/server and, just for a decent relative metric, their Github Watcher count. If you want a heap of other projects (including other languages like Haskell and Python) Nanoc has the mother of all site generator lists. If you recommend another one, by all means add a comment.
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
// Lefalet shortcuts for common tile providers - is it worth adding such 1.5kb to Leaflet core? | |
L.TileLayer.Common = L.TileLayer.extend({ | |
initialize: function (options) { | |
L.TileLayer.prototype.initialize.call(this, this.url, options); | |
} | |
}); | |
(function () { | |
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 apt-get install python2.7 | |
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.6 20 | |
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 10 | |
sudo update-alternatives --set python /usr/bin/python2.6 | |
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
###################################################################### | |
# CURRENT AWARE LOCAL DATETIME | |
###################################################################### | |
from datetime import datetime | |
from tzlocal import get_localzone | |
local_tz = get_localzone() | |
local_dt = datetime.now(local_tz) |
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
# Install ARCH Linux with encrypted file-system and UEFI | |
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description. | |
# Download the archiso image from https://www.archlinux.org/ | |
# Copy to a usb-drive | |
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux | |
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration. | |
# Set swedish keymap |
- Web framework: Play
- Actors: akka
- Authentication: ?
- Authorization: ?
- ORM: doobie (for PostgreSQL)
- Evolutions: flyaway
- I/O: better-files
- JSON: circe + play-circe
NetworkManager supports WiFi powersaving but the function is rather undocumented.
From the source code: wifi.powersave can have the following value:
- NM_SETTING_WIRELESS_POWERSAVE_DEFAULT (0): use the default value
- NM_SETTING_WIRELESS_POWERSAVE_IGNORE (1): don't touch existing setting
- NM_SETTING_WIRELESS_POWERSAVE_DISABLE (2): disable powersave
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
# Scala Installation | |
wget https://downloads.lightbend.com/scala/2.12.2/scala-2.12.2.deb | |
sudo dpkg -i scala-2.12.2.deb | |
# sbt Installation | |
echo "deb https://dl.bintray.com/sbt/debian /" | sudo tee -a /etc/apt/sources.list.d/sbt.list | |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2EE0EA64E40A89B84B2DF73499E82A75642AC823 | |
sudo apt-get update | |
sudo apt-get install sbt |
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
SELECT | |
SUBSTRING_INDEX(number, '.', 1) AS FIRST_INT, | |
SUBSTRING_INDEX(SUBSTRING_INDEX(number, '.', 2), '.', -1) AS SECOND_INT, | |
SUBSTRING_INDEX(number, '.', -1) AS THIRD_INT, | |
number as VERSION, | |
description as TITLE | |
FROM _version | |
ORDER BY | |
LENGTH(SUBSTRING_INDEX(number, '.', 1)) DESC, | |
SUBSTRING_INDEX(number, '.', 1) DESC, |
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
object Algebra { | |
// Build up increasingly complex algebras | |
trait Magma[T] { | |
def add(x : T, y : T) : T | |
} | |
trait Monoid[T] extends Magma[T] { | |
def zero : T | |
} |
OlderNewer