npm install -g prettier
which prettier
-> ^ remember the path
IDEA: settings -> external tools -> add new
## 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 |
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) => { |
(defprotocol View | |
"View abstraction" | |
(render [this some-param] "Renders view") | |
(destroy [_] "Destroys view, runs cleanup")) | |
(deftype ProjectView [data] | |
View | |
(render [this some-param] [:h1 (str "Hello " (:name data) " some param we passed in " some-param)]) | |
(destroy [_] (println "Cleaning up"))) |
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 |
#!/bin/bash | |
set -e | |
command="$1" | |
eka() { | |
local use_x_flag=false | |
while getopts ":x:" o; do | |
case "${o}" in |