This document describes my setup for taking notes from videos, using Emacs and org-mode.
My goals:
- Embed & playback video links into my notes
- Generate, embed & post process animated from my notes
#!/bin/bash | |
KUBERNETES=https://$KUBERNETES_SERVICE_HOST:$KUBERNETES_SERVICE_PORT | |
TOKEN=`cat /var/run/secrets/kubernetes.io/serviceaccount/token` | |
POD=`hostname` | |
curl -s -k -H "Authorization: Bearer $TOKEN" $KUBERNETES/api/v1/namespaces/$KUBERNETES_NAMESPACE/pods/$POD | grep -i hostIp | cut -d "\"" -f 4 |
#Generate master.key and secret | |
MAGIC="::::MAGIC::::" | |
mkdir -p /var/jenkins_home/secrets | |
openssl rand -hex 128 > /var/jenkins_home/secrets/master.key | |
openssl dgst -sha256 -binary /var/jenkins_home/secrets/master.key > /tmp/master.hashed | |
HEX_MASTER_KEY=`head -c 16 /tmp/master.hashed | xxd -l 16 -p` | |
openssl rand 259 > /tmp/base | |
echo $MAGIC >> /tmp/base | |
openssl enc -aes-128-ecb -in /tmp/base -K $HEX_MASTER_KEY -out /var/jenkins_home/secrets/hudson.util.Secret |
#!/bin/sh | |
# | |
# An example hook script to verify what is about to be committed. | |
# Called by "git commit" with no arguments. The hook should | |
# exit with non-zero status after issuing an appropriate message if | |
# it wants to stop the commit. | |
# | |
# To enable this hook, rename this file to "pre-commit". | |
if git rev-parse --verify HEAD >/dev/null 2>&1 |
(defun github-current-user () | |
"Get the curently logged in user." | |
(let ((page-source (if (web-buffer-p (current-buffer)) | |
(plump:serialize (document-model (current-buffer)) nil) | |
(ffi-buffer-get-document (current-buffer))))) | |
(ppcre:register-groups-bind (user) (".*<meta name=\"user-login\" content=\"([a-zA-Z0-9_-]+)\">.*" page-source) user))) | |
import jenkins.model.* | |
import com.cloudbees.plugins.credentials.* | |
import com.cloudbees.plugins.credentials.common.* | |
import com.cloudbees.plugins.credentials.domains.* | |
import com.cloudbees.plugins.credentials.impl.* | |
import com.cloudbees.jenkins.plugins.sshcredentials.impl.* | |
import hudson.plugins.sshslaves.*; | |
domain = Domain.global() | |
store = Jenkins.instance.getExtensionList('com.cloudbees.plugins.credentials.SystemCredentialsProvider')[0].getStore() |
<filter> | |
<simple>${body.size} != 0</simple> | |
<to uri="my:final-destination"/> | |
</filter> |
#!/bin/bash | |
IN=`echo $1 | base64` | |
SUFFIX="::::MAGIC::::" | |
MASTER_KEY=`cat /var/jenkins_home/secrets/master.key` | |
HASHED_MASTER_KEY=`echo -n $MASTER_KEY | sha256sum | cut -d " " -f 1` | |
HASHED_MASTER_KEY_16=${HASHED_MASTER_KEY:0:16} | |
openssl enc -d -aes-128-ecb -in /var/jenkins_home/secrets/hudson.util.Secret -K $HASHED_MASTER_KEY -out /tmp/hudson.key | |
HUDSON_KEY=`cat /tmp/hudson.key` | |
HUDSON_KEY_TRIMMED=${HUDSON_KEY:0:-16} | |
HUDSON_KEY_16=${HUDSON_KEY_TRIMMED:0:16} |
#!/bin/bash | |
JOB="dev" | |
CONFIG_XML="/tmp/jenkins-job.xml" | |
PIPELINE=`cat $1` | |
read -r -d '' HEADER << __HEADER__ | |
<?xml version="1.0" encoding="UTF-8"?><flow-definition plugin="workflow-job@2.3"> | |
<actions/> | |
<description/> |