Restrict the amount of CPU and memory resources that Chrome can consume.
Tested on Ubuntu 16.04/Linux Mint 18.
Install cgroups:
sudo apt install cgroup-bin
section .text | |
global _start | |
_start: | |
; mov edx, msg_len | |
; mov ecx, msg | |
; mov ebx, 1 | |
; mov eax, 4 | |
; int 0x80 | |
; mov eax,3 ;instrucao para ler |
section .text | |
global _start | |
_start: | |
mov edx, msg_len | |
mov ecx, msg | |
mov ebx, 1 | |
mov eax, 4 | |
int 0x80 | |
mov eax,3 ;instrucao para ler |
(require '[clojure.spec.test.alpha :as st]) | |
(require '[clojure.spec.alpha :as s]) | |
(require '[expound.alpha :as expound]) | |
(set! s/*explain-out* expound/printer) | |
(st/instrument) | |
(filter 123 "12333333333333") ; java.lang.Long cannot be cast to clojure.lang.IFn | |
(s/fdef clojure.core/filter |
import RPi.GPIO as gpio | |
import time | |
gpio.setmode(gpio.BCM) | |
gpio.setup(17, gpio.OUT) | |
gpio.setup(18, gpio.OUT) | |
gpio.setup(22, gpio.OUT) | |
gpio.setup(23, gpio.OUT) | |
gpio.setup(24, gpio.OUT) |
Restrict the amount of CPU and memory resources that Chrome can consume.
Tested on Ubuntu 16.04/Linux Mint 18.
Install cgroups:
sudo apt install cgroup-bin
In an effort to gain at least a superficial understanding of the technical implementation of cryptocurrencies, I recently worked my way through "Learn Blockchains by Building One" using Clojure.
This was a good chance to experiment with using spec in new ways. At work, we primarily use spec to validate our global re-frame state and to validate data at system boundaries. For this project, I experimented with using instrumentation much more pervasively than I had done elsewhere.
This is not a guide to spec (there are already many excellent resources for this). Rather, it's an experience report exploring what went well, what is still missing, and quite a few unanswered questions for future research. If you have solutions for any of the problems I've presented, please let me know!
You don't need to know or care about blockchains to understand the code be
This is a selection of the most articulated critique found in the open comments section Q25 at the bottom of the survey. Recurring themes are:
I recently had to figure out for a Clojure application how to download all dependency JAR files, for use in a Docker container.
When creating an uberjar, depstar re-downloaded all the external dependencies from Maven central, even though in an earlier Docker build step, I ran clj -Spath
to pre-download them (presumably cached into the .m2 directory). In the past, I've used lein deps
to do something similiar.
I'm grateful for Sean Corfield helping out (again!!): In short, use clj -P
(short for "prepare") to download dependencies. Note the "A:depstar" option, which ensures that the depstar dependencies are downloaded, too.
Here's what it looks like in a Dockerfile:
# to pre-download dependencies, only done if deps.edn changes