This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def numbers = 1..6 | |
def max_splits = 7 | |
count = numbers.size() | |
overflow = count % max_splits | |
pergroup = count.intdiv(max_splits) | |
println "Count: " + count + ", overflow: " + overflow + ", pergroup: " + pergroup |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
List<String> toollist = // a list of tool ids | |
Set<String, String> mapToolId = // a map convert ids to fully qualified names | |
Set<String> fqToolList = toollist.stream() | |
.peek( n -> { if (!mapToolId.containsKey(n.trim())) logger.warn("Ignoring unexpected tool id value '{}'", n); }) | |
.filter( n -> mapToolId.containsKey(n.trim()) ) | |
.map( n -> mapToolId.get(n.trim())) // map shorthand tool names to fully qualified tool names | |
.collect( Collectors.toCollection(HashSet::new) ); // make sure we have a mutable set |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stefan@atlas-stfs ~ tracepath postur.hi.is ✔ 4131 18:37:25 | |
1?: [LOCALHOST] pmtu 1500 | |
1: router-stfs.freyr.org 0.908ms | |
1: router-stfs.freyr.org 0.908ms | |
2: 10.202.20.2 2.648ms | |
3: no reply | |
4: no reply | |
5: GR-VFIS-1-s28.c.is 2.088ms asymm 6 | |
6: te3-5-D01-Sidumuli.c.is 11.256ms asymm 7 | |
7: te3-5-D01-Sidumuli.c.is 2.705ms |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am stfs on github. | |
* I am stfs (https://keybase.io/stfs) on keybase. | |
* I have a public key ASBiy-4onUWaB3v0HvdZ2E7JbplckrbuhtZ6kpd6isznago | |
To claim this, I am signing this object: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function _use-java_usage() { | |
echo "Usage use-java VERSION" | |
echo 'Set the Oracle JDK version to use for the current session.' | |
echo '' | |
echo 'The VERSION is the JDK version to use such that' | |
echo 'the directory /usr/lib/jvm/java-${VERSION}-oracle' | |
echo 'will be set as JAVA_HOME and the corresponding bin/' | |
echo 'directory will be added to the front of PATH.' | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TASK [nextcode-jenkins : pull docker-jenkins image] **************************** | |
task path: /home/stefan/work/ansible-roles/nextcode-jenkins/tasks/main.yml:22 | |
Using module file /usr/lib/python2.7/dist-packages/ansible/modules/core/cloud/docker/docker_image.py | |
<127.0.0.1> ESTABLISH SSH CONNECTION FOR USER: vagrant | |
<127.0.0.1> SSH: EXEC ssh -vvv -o UserKnownHostsFile=/dev/null -o IdentitiesOnly=yes -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o Port=2200 -o 'IdentityFile="/home/stefan/work/ansible-roles/nextcode-jenkins/.vagrant/machines/default/virtualbox/private_key"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=vagrant -o ConnectTimeout=30 -o ControlPath=/home/stefan/.ansible/cp/ansible-ssh-%h-%p-%r 127.0.0.1 '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1480550227.14-203686490239185 `" && echo ansible-tmp-1480550227.14-203686490239185="` echo $H |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: log in to private docker repo | |
docker_login: | |
registry: our.docker.repo.com | |
username: foo | |
password: bar | |
- name: pull docker-jenkins image | |
docker_image: | |
name: "our.docker.repo.com/jenkins:stfs" | |
tag: "stfs" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Aug 3 17:15:40 hyperion-stfs sensord: Chip: acpitz-virtual-0 | |
Aug 3 17:15:40 hyperion-stfs sensord: Adapter: Virtual device | |
Aug 3 17:15:40 hyperion-stfs sensord: temp1: 52.0 C | |
Aug 3 17:15:40 hyperion-stfs sensord: Chip: coretemp-isa-0000 | |
Aug 3 17:15:40 hyperion-stfs sensord: Adapter: ISA adapter | |
Aug 3 17:15:40 hyperion-stfs sensord: Physical id 0: 49.0 C | |
Aug 3 17:15:40 hyperion-stfs sensord: Core 0: 48.0 C | |
Aug 3 17:15:40 hyperion-stfs sensord: Core 1: 49.0 C | |
Aug 3 17:15:40 hyperion-stfs sensord: Chip: pch_wildcat_point-virtual-0 | |
Aug 3 17:15:40 hyperion-stfs sensord: Adapter: Virtual device |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import base64, string, urllib | |
rot13 = string.maketrans("ABCDEFGHIJKLMabcdefghijklmNOPQRSTUVWXYZnopqrstuvwxyz","NOPQRSTUVWXYZnopqrstuvwxyzABCDEFGHIJKLMabcdefghijklm") | |
print(urllib.unquote(string.translate(base64.b64decode('VyVQMyVPM3l2YSUyMGElUDMlTjF5dG5mZyUyMCVQMyVPMyVQMyVPMHN5aHRu'), rot13))) |