Skip to content

Instantly share code, notes, and snippets.

View blipp's full-sized avatar

Benjamin Lipp blipp

View GitHub Profile

Nb: block_length Nh: hash_length (output length)

Formula for maximum input length for a LabeledExtract IKM: max_input_length - Nb - size_label_rfcXXXX - size_label_local

Formula for maximum input length for a LabeledExpand info:

@blipp
blipp / mute-background-music.js
Created April 7, 2020 10:58
Bookmarklet for BigBlueButton to mute while only one participant is in the room
javascript:(function(){function mute() { if (document.querySelectorAll('.participantsList--1MvMwF').length <= 1) { document.getElementById('remote-media').muted = true; console.log('Audio muted because there is only one participant.'); } else { console.log('Audio unmuted because there is more than one participant.'); document.getElementById('remote-media').muted = false; }}; mute(); const targetNode = document.getElementsByClassName('userListColumn--6vKQL')[0]; const config = { attributes: true, childList: true, subtree: true }; const callback = function(mutationsList, observer) { for(let mutation of mutationsList) { if (mutation.type === 'childList') { mute() } else if (mutation.type === 'attributes') { console.log('The ' + mutation.attributeName + ' attribute was modified.'); } } }; const observer = new MutationObserver(callback); observer.observe(targetNode, config);})();
@blipp
blipp / keybase.md
Created December 21, 2017 08:06
keybase.md

Keybase proof

I hereby claim:

  • I am blipp on github.
@blipp
blipp / list.sage
Created March 8, 2016 22:09
List performance in Sage (Python)
n = 140000
L = []
start = cputime()
for i in range(n):
L = L + [i]
diff = cputime(start)
print diff
L = []
@blipp
blipp / after running the relocate script as root
Last active February 5, 2016 11:29 — forked from anonymous/after running the relocate script as root
Sage installation error during relocate
$ sudo chown -R USER:USER .sage (replace USER by actual user name)
@blipp
blipp / ekpxinit
Created March 24, 2015 13:41
xinit with automatic detection of X display number and virtual terminal
#!/bin/bash
# TODO: test if the X server's -displayfd option for automatic detection of a
# free X display works
get_next_display_number() {
local DISPLAY_NUM=0
while [ $DISPLAY_NUM -lt 10 ]; do
if [ -e /tmp/.X$DISPLAY_NUM-lock ]
then
@blipp
blipp / keybase.md
Created October 8, 2014 00:29
keybase.md

Keybase proof

I hereby claim:

  • I am blipp on github.
  • I am blipp (https://keybase.io/blipp) on keybase.
  • I have a public key whose fingerprint is DF63 5289 61FC FEC7 EA9F C504 FBA5 92E9 7888 1C94

To claim this, I am signing this object:

@blipp
blipp / install-openstack.sh
Last active December 15, 2021 16:40
Scripts to setup an virtual external network with OpenStack after a setup with packstack --allinone
#!/bin/bash
# see http://information-technology.web.cern.ch/book/cern-cloud-infrastructure-user-guide/advanced-topics/installing-openstack#icehouse
set -x
echo "set term=xterm" >> .vimrc
yum install -y etckeeper
etckeeper init
etckeeper commit
yum install -y http://rdo.fedorapeople.org/rdo-release.rpm
sed -i -e 's/priority.*/priority=1/g' /etc/yum.repos.d/rdo-release.repo
sed --in-place '/^exclude=libmongodb/d;s/^priority=/exclude=libmongodb,pymongo\*,mongodb\*,python-bson,python-webob,python-mako,python-webtest\npriority=/g' /etc/yum.repos.d/slc6-os.repo /etc/yum.repos.d/slc6-updates.repo /etc/yum.repos.d/slc6-extras.repo
@blipp
blipp / ifconfig-host
Last active August 29, 2015 14:04
Network Configuration of OpenStack
# ifconfig
br-ex Link encap:Ethernet HWaddr 76:59:5D:7C:8D:43
inet6 addr: fe80::c8eb:17ff:fe5f:e0fd/64 Scope:Link
UP BROADCAST RUNNING MTU:1500 Metric:1
RX packets:291 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:12438 (12.1 KiB) TX bytes:468 (468.0 b)
@blipp
blipp / gist:5fd6e936ae022991f6d4
Created June 30, 2014 10:39
Mirakel error message when trying to sync with Taskwarrior server taskd: bad base-64
E/TLSClient( 7508): bad base-64
E/TLSClient( 7508): java.lang.IllegalArgumentException: bad base-64
E/TLSClient( 7508): at android.util.Base64.decode(Base64.java:161)
E/TLSClient( 7508): at android.util.Base64.decode(Base64.java:136)
E/TLSClient( 7508): at android.util.Base64.decode(Base64.java:118)
E/TLSClient( 7508): at de.azapps.mirakel.sync.taskwarrior.TLSClient.parseDERFromPEM(TLSClient.java:105)
E/TLSClient( 7508): at de.azapps.mirakel.sync.taskwarrior.TLSClient.generateCertificateFromPEM(TLSClient.java:52)
E/TLSClient( 7508): at de.azapps.mirakel.sync.taskwarrior.TaskWarriorSync.doSync(TaskWarriorSync.java:207)
E/TLSClient( 7508): at de.azapps.mirakel.sync.taskwarrior.TaskWarriorSync.sync(TaskWarriorSync.java:524)
E/TLSClient( 7508): at de.azapps.mirakel.sync.SyncAdapter.onPerformSync(SyncAdapter.java:128)