npm install -g prettier
which prettier
-> ^ remember the path
IDEA: settings -> external tools -> add new
days = 16 | |
current_body_count = 400 | |
body_count = current_body_count | |
for d in range(1, days+1): | |
if d % 3 == 0: | |
body_count = body_count * 2 | |
print("body count: ", body_count) | |
const password = 'kuikka' | |
const keyIv = cryptoUtils.deriveAES256KeyAndIv(password.replace(/\s/g, '')) | |
const maxFileSize = 2 * 1024 * 1024 * 1024 | |
const isMeb = fileName => /\.meb$/.test(fileName) | |
const isZip = fileName => isMeb(fileName) || /\.zip$/.test(fileName) | |
const isEncryptedZip = fileName => /\.zip\.bin$/.test(fileName) | |
const isEncryptedJson = fileName => /\.json\.bin$/.test(fileName) | |
const readZipContents = (zipFileName, zipContents) => { |
For the lack of a nail, | |
throw new HorseshoeNailNotFoundException("no nails!"); | |
For the lack of a horseshoe, | |
EquestrianDoctor.getLocalInstance().getHorseDispatcher().shoot(); | |
For the lack of a horse, | |
RidersGuild.getRiderNotificationSubscriberList().getBroadcaster().run( | |
new BroadcastMessage(StableFactory.getNullHorseInstance())); |
// Map and flatMap for Options/Lists | |
scala> val myList : List[Option[Int]] = List(Some(1), None, Some(2)) | |
myList: List[Option[Int]] = List(Some(1), None, Some(2)) | |
scala> myList.flatten.map(x=>x*2) | |
res15: List[Int] = List(2, 4) | |
scala> myList.flatMap((x) => x.map(_*2)) | |
res16: List[Int] = List(2, 4) |
var express = require('express'); | |
var app = express(); | |
app.use(express.static('public')); | |
app.listen(8000, function () { | |
console.log('Example app listening on port 8000!'); | |
}); |
[Unit] | |
Description=Mailcatcher service | |
After=network.target | |
[Service] | |
WorkingDirectory=/opt/node/apps/hela-webapp | |
ExecStart=/usr/local/bin/mailcatcher -f --smtp-port 2155 --http-ip=0.0.0.0 --http-port 8181 --smtp-ip=0.0.0.0 | |
Restart=always | |
StandardOutput=syslog | |
StandardError=syslog |
util.error: Use console.error instead | |
WARN: Condition always false [-:8426,6] | |
util.error: Use console.error instead | |
WARN: Dropping side-effect-free statement [-:8426,6] | |
util.error: Use console.error instead | |
WARN: Condition always false [-:8436,49] | |
util.error: Use console.error instead | |
WARN: Condition always false [-:8441,95] | |
util.error: Use console.error instead | |
WARN: Condition always false [-:8454,34] |
sailniir: @auramo http://shop.oreilly.com/product/0636920030867.do | |
Linux Device Drivers | |
Having already helped two generations of programmers explore Linux and write devices, the fourth edition of this classic book delves into tty, USB, and HCI devices such as keyboards, in addition to... | |
[12:27 PM] auramo: tost ajattelin kysyä, mut onkohan jo obsolete | |
[12:28 PM] sailniir: eli odottaa hän vielä vuosi ja 2 kuukautta kivasti ;-) | |
[12:28 PM] sailniir: mä kattelin vuodenvaihteessa että kesällä pitäis tulla toi neljäs editio, kesällä se oli sit tulossa lokakuussa, ja nyt tulossa Nov 2016 |
## Using Emacs CIDER as the Figwheel REPL tool | |
project.clj should have this line: | |
``` | |
:figwheel { :nrepl-port 7888 } | |
``` | |
At the defproject-level. | |
It enables external tools to connect to the Figwheel REPL. To connect |