Skip to content

Instantly share code, notes, and snippets.

View praseodym's full-sized avatar
:shipit:
ship it

Mark Janssen praseodym

:shipit:
ship it
View GitHub Profile
@praseodym
praseodym / gist:8402879
Last active January 3, 2016 03:29
cbench latency test, using beacon 4 threads
cbench load-generation command:
➜ et4285-masti git:(master) ~/oflops/cbench/cbench -c 10.10.2.23 -p 6633 -m 1000 -l 1000 -w 0 -s 64 -M 1000 -t
(in parallel with and on same host as)
cbench latency command:
➜ ~ ~/oflops/cbench/cbench -c 10.10.2.23 -p 6633 -m 1000 -l 25 -w 5 -s 1 -M 1 -o 1 -m 1000
➜ ~ ~/oflops/cbench/cbench -c 10.10.2.23 -p 6633 -m 1000 -l 25 -w 5 -s 1 -M 1 -o 1 -m 1000
@praseodym
praseodym / AESGCMUpdateAAD2.java
Last active June 7, 2021 16:38
JDK8 AES-GCM code example
import javax.crypto.*;
import javax.crypto.spec.GCMParameterSpec;
import java.nio.ByteBuffer;
import java.security.SecureRandom;
import java.util.Arrays;
public class AESGCMUpdateAAD2 {
// AES-GCM parameters
public static final int AES_KEY_SIZE = 128; // in bits
@praseodym
praseodym / gist:0b0cab838649fa655248
Created February 18, 2015 14:08
strongswan ciphers
[2.2-RELEASE][root@fw-01.chnet]/var/etc/ipsec: ipsec listall
List of X.509 CA Certificates:
subject: "C=NL, ST=Zuid-Holland, L=Delft, O=WISVCH, E=beheer@ch.tudelft.nl, CN=internal-ca"
issuer: "C=NL, ST=Zuid-Holland, L=Delft, O=WISVCH, E=beheer@ch.tudelft.nl, CN=internal-ca"
serial: 00
validity: not before Jan 09 02:06:45 2015, ok
not after Jan 06 02:06:45 2025, ok
pubkey: RSA 2048 bits
---
- name: configure kbd
template: src=kbd-config.j2 dest=/etc/kbd/config mode=644 owner=root group=root
notify:
- reload kbd
- name: update grub to disable console blanking
lineinfile: dest=/etc/default/grub state=present regexp="^GRUB_CMDLINE_LINUX_DEFAULT=.*$" line="GRUB_CMDLINE_LINUX_DEFAULT=\"consoleblank=0\""
notify:
2c2
< -- Tables for OIDC Server functionality, HSQL
---
> -- Tables for OIDC Server functionality, PostgreSQL
6c6
< id BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 1) PRIMARY KEY,
---
> id SERIAL PRIMARY KEY,
23c23
< id BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 1) PRIMARY KEY,
@praseodym
praseodym / hubot.service
Last active May 10, 2017 15:39
Hubot systemd service file
[Unit]
Description=Hubot
Requires=network.target
After=network.target
[Service]
Type=simple
WorkingDirectory=/opt/hubot
User=hubot
@praseodym
praseodym / graphviz.md
Last active August 29, 2015 14:22
Graphviz template

Compile with Graphviz.

Command line: dot -Tpdf template.gv -o template.pdf

@praseodym
praseodym / zshrc
Created August 31, 2015 07:37
old zshrc without external dependencies
setopt NOHUP
# setopt AUTO_LIST # these two should be turned off
# setopt AUTO_REMOVE_SLASH # When the last character resulting from a completion is a slash and the next character typed is a word delimiter, remove the slash.
setopt HIST_ALLOW_CLOBBER
setopt HIST_REDUCE_BLANKS
setopt INC_APPEND_HISTORY SHARE_HISTORY
setopt ALL_EXPORT
setopt AUTO_CD # cd if no matching command
setopt EXTENDED_HISTORY # saves timestamps on history
@praseodym
praseodym / trace.log
Created September 19, 2015 15:56
SSL error with OpenSAML 2.6.4
Sep 19 17:45:32 hendrik java[20881]: INFO : org.apache.commons.httpclient.HttpMethodDirector - I/O exception (javax.net.ssl.SSLPeerUnverifiedException) caught when processing request: SSL peer failed hostname validation for name: 130.161.129.121
Sep 19 17:45:32 hendrik java[20881]: INFO : org.apache.commons.httpclient.HttpMethodDirector - Retrying request
Sep 19 17:45:32 hendrik java[20881]: INFO : org.apache.commons.httpclient.HttpMethodDirector - I/O exception (javax.net.ssl.SSLPeerUnverifiedException) caught when processing request: SSL peer failed hostname validation for name: 130.161.129.121
Sep 19 17:45:32 hendrik java[20881]: INFO : org.apache.commons.httpclient.HttpMethodDirector - Retrying request
Sep 19 17:45:32 hendrik java[20881]: INFO : org.apache.commons.httpclient.HttpMethodDirector - I/O exception (javax.net.ssl.SSLPeerUnverifiedException) caught when processing request: SSL peer failed hostname validation for name: 130.161.129.121
Sep 19 17:45:32 hendrik java[20881]: INFO : org.apache.commons
.encoding = "UTF-8"
config.version = "8"
virtualHW.version = "11"
nvram = "testserver6.nvram"
pciBridge0.present = "TRUE"
svga.present = "TRUE"
pciBridge4.present = "TRUE"
pciBridge4.virtualDev = "pcieRootPort"
pciBridge4.functions = "8"
pciBridge5.present = "TRUE"