Simplify travis encrypt ... --add
on macOS, use KeyChain
-
Get Github Access Token follow the link.
-
Add link to KeyChain with:
#!/usr/bin/env python3 | |
import subprocess as sp | |
import shlex | |
CMD_SYSTEMV_LIST=""" | |
service --status-all | cut -d']' -f2 | xargs -n 1 | |
""" | |
CMD_SYSTEMD_LIST=""" | |
systemctl list-units --type=service | cut -d' ' -f1 |
Snippets: | |
- description: get distinct types of location | |
url: https://jqplay.org/s/Od6lj5qjwm | |
filter: | | |
[ ..|.types? | arrays ] | flatten | unique | |
- description: select places are typeof resturant | |
url: https://jqplay.org/s/_BAt2M6bkZ | |
filter: | | |
.results[] | select( .types[] | contains("restaurant") ) |
package main | |
import ( | |
"fmt" | |
"time" | |
) | |
/* Note that both "sending to" and "retrieving from" a channel can block. | |
* - sending to a channel will block until it is closed and all sent | |
* elements get retrieved. |
Simplify travis encrypt ... --add
on macOS, use KeyChain
Get Github Access Token follow the link.
Add link to KeyChain with:
locale
will be used by locale-aware programs, likely depends on glibc
.
Programs will complain if cannot find used locales (check via locale
) within available locales (check via locale -a
).
One will have to generate/put used locales into path (find by localedef --help | grep 'locale path'
) to fix the issue.
MAIN ?= $(firstword $(wildcard *.py)) | |
CONDA_ENV ?= "$(shell conda info --envs | sed -n 's/^\([^[:space:]]*\).*\*.*/\1/p')" | |
SHELL = /bin/bash | |
LD_LIBRARY_PATH := "$(shell conda info --envs | sed -n 's/.*\*[ ]*\(\/.*\)$$/\1/p')/lib/" | |
SET_CONDA = source activate $(CONDA_ENV) | |
import java.util.concurrent.ForkJoinPool; | |
import java.util.concurrent.ForkJoinTask; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.stream.Collectors; | |
public class TestForkJoinPool { | |
static String accumulate(int from, int to, String name) { | |
int sum = 0; |
Since Scala 2.12, -optimise
flag of scalac
was deprecated.
scalac -help
shows:
Deprecated settings:
-optimise
Compiler flag for the optimizer in Scala 2.11 deprecated: In 2.12,-optimise
enables-opt:l:inline -opt-inline-from:**
. Check-opt:help
for using the Scala 2.12 optimizer.
It works file in bash
, while error will throw if you use without asterisks quoted in zsh 5.4.2
:
// a trivial extension on SO6996704 | |
// `fmt.Printf("%T", x)` returns same as `reflect.TypeOf(x).Name()` | |
// without considering other aspects like impairments on execution time. | |
package main | |
import ( | |
"fmt" | |
"reflect" | |
) |
#### config packages #### | |
PACKAGES := \ | |
net.liftweb:lift-json:2.0 \ | |
datastax:spark-cassandra-connector:1.6.10-s_2.11 \ | |
#### main part #### | |
null := | |
space := $(null) # |