Skip to content

Instantly share code, notes, and snippets.

View LorbusChris's full-sized avatar
:shipit:

Christian Glombek LorbusChris

:shipit:
View GitHub Profile
@LorbusChris
LorbusChris / hello_world.c
Created February 27, 2017 20:03 — forked from kripken/hello_world.c
Standalone WebAssembly Example
int doubler(int x) {
return 2 * x;
}
oc exec <pod> [-c <container>] <command> [<arg_1> ... <arg_n>]
function doWork () {
var timer = new Date ();
// do n cyles of work here
timer = new Date () - timer; // time spent working
setTimeout (doWork, timer); // wait an equivalent time for 50% processor load
}
{
"kind": "Template",
"apiVersion": "v1",
"metadata": {
"name": "freeipa-server",
"labels": {
"app": "${IPA_SERVER_SERVICE}"
},
"annotations": {
"openshift.io/display-name": "FreeIPA Server",
@LorbusChris
LorbusChris / namespaced-acme-controller.yaml
Last active September 19, 2017 04:33
OpenShift ACME Controller
apiVersion: v1
kind: Template
metadata:
name: namespaced-acme-controller
parameters:
- description: ACME Endpoint URL
name: OPENSHIFT_ACME_ACMEURL
value: https://acme-staging.api.letsencrypt.org/directory
- description: Controller loglevel
name: OPENSHIFT_ACME_LOGLEVEL
@LorbusChris
LorbusChris / docker_dev.sh
Last active November 4, 2017 18:31
Docker Dev Flow
sudo groupadd docker
sudo usermod -aG docker $USER
# log out & back in
docker login docker.io
docker build . -t docker.io/lorbus/container-name
docker push docker.io/lorbus/container-name
# Delete all containers
@LorbusChris
LorbusChris / rpm_dev.sh
Created September 16, 2017 03:55
RPM Dev Flow
# fedora login
KRB5_TRACE=/dev/stdout kinit [email protected]
# rpm build procedure
rpmlint coturn.spec
rpmbuild --nodeps -bs coturn.spec
koji build --scratch f27 /home/chris/rpmbuild/SRPMS/coturn-4.5.0.6-1.fc26.src.rpm
@LorbusChris
LorbusChris / gerrit_dev.sh
Last active February 1, 2018 14:38
Gerrit Dev Flow
git clone git clone git://gerrit.libreoffice.org/core
cd core
./logerrit setup
./logerrit test
# alternatively
git review -s
# then..
# commit hooks for Change-Id
./g -z
$ git config --global user.name "John Doe"
$ git config --global user.email [email protected]
@LorbusChris
LorbusChris / canary.spec
Created September 24, 2017 04:42
Canary RPM Spec
%define build_timestamp %(date +"%Y%m%d%H%M%%S")
%define github_user LorbusChris
%define github_repo REPLACEME
%define github_branch master
Version: canary
Release: %{build_timestamp}%{?dist}
Source0: https://github.com/%{github_user}/%{github_repo}/archive/%{github_branch}.tar.gz