Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
// http://docs.groovy-lang.org/latest/html/documentation/grape.html | |
// http://mvnrepository.com/artifact/org.codehaus.groovy.modules.http-builder/http-builder/0.7.1 | |
groovy.grape.Grape.grab(group:'org.codehaus.groovy.modules.http-builder', module:'http-builder', version:'0.7.1') | |
import groovyx.net.http.HTTPBuilder |
# npm using https for git | |
git config --global url."https://github.com/".insteadOf git@github.com: | |
git config --global url."https://".insteadOf git:// | |
# npm using git for https | |
git config --global url."git@github.com:".insteadOf https://github.com/ | |
git config --global url."git://".insteadOf https:// |
# Move to root directory... | |
cd / | |
mkdir keys | |
cd keys | |
# Generate a self signed certificate for the CA along with a key. | |
mkdir -p ca/private | |
chmod 700 ca/private | |
# NOTE: I'm using -nodes, this means that once anybody gets | |
# their hands on this particular key, they can become this CA. |
package enum_example | |
import ( | |
"bytes" | |
"encoding/json" | |
) | |
// TaskState represents the state of task, moving through Created, Running then Finished or Errorred | |
type TaskState int |
# 1. First of all of course get Manjaro: | |
https://manjaro.org/get-manjaro/ | |
# I recommend using Etcher to copy the image to your USB: | |
https://etcher.io/ | |
# 2. Before installing make sure: | |
# - Secure boot is disabled in BIOS | |
# - Your SSD, HDD or NVME drive is set to AHCI instead of RAID | |
# - Fastboot should be on Auto or minimal, but this shouldn't matter to much |
task printTaskInputs { | |
doLast { | |
project.getTasks().each { task -> | |
println "--------------------------------------------------------------------------------" | |
println " Task '${project.name}:${task.name}'" | |
println "--------------------------------------------------------------------------------" | |
println "" | |
println "File inputs:" | |
task.inputs.files.each { |
Do this in cases when you dont want to change the os-level settings, but only want to disable the OOM killer for a single process. This is useful when youre on a shared machine/server.
The OOM killer uses the process level metric called oom_score_adj
to decide if/when to kill a process.
This file is present in /proc/$pid/oom_score_adj
. The oom_score_adj can vary from -1000
to 1000
, by default it is 0.
You can add a large negative score to this file to reduce the probability of your process getting picked and terminated by OOM killer. When you set it to -1000, it can use 100% memory and still avoid getting terminated by OOM killer.