Skip to content

Instantly share code, notes, and snippets.

View jedisct1's full-sized avatar

Frank Denis jedisct1

View GitHub Profile
BS-SPEKE
BS-SPEKE is a modified B-SPEKE with blind salt (OPRF). Modified B-SPEKE is a
similar change from SPEKE as from SPAKE2 to SPAKE2+ to make it augmented. Doing
this saves a scalar point multiply vs original B-SPEKE with blind salt. There
are no proofs, but it's not hard to take the SPEKE proof, add the OPAQUE proof
for OPRF, and it's obvious that the augmented change makes it augmented. So if
anyone knows how to formally state that in a proof, that would be awesome to
have.
@jedisct1
jedisct1 / docker-cleanup-resources.md
Created March 28, 2019 19:12 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@jedisct1
jedisct1 / xdp_load_balancer.c
Created February 20, 2019 00:27 — forked from summerwind/xdp_load_balancer.c
XDP based load balancer with L3DSR support
#define KBUILD_MODNAME "load_balancer"
#include <uapi/linux/bpf.h>
#include <linux/in.h>
#include <linux/if_ether.h>
#include <linux/if_packet.h>
#include <linux/if_vlan.h>
#include <linux/ip.h>
#include <linux/ipv6.h>
BPF_HASH(counter, uint32_t, long);
@jedisct1
jedisct1 / dynamic-dns.txt
Created May 23, 2018 21:09 — forked from neu5ron/dynamic-dns.txt
List of Dynamic DNS
This file has been truncated, but you can view the full file.
3d-game.com #dtdns.com
4irc.com #dtdns.com
b0ne.com #dtdns.com
bbsindex.com #dtdns.com
chatnook.com #dtdns.com
darktech.org #dtdns.com
deaftone.com #dtdns.com
dtdns.net #dtdns.com
effers.com #dtdns.com
etowns.net #dtdns.com
@jedisct1
jedisct1 / spectre.c
Last active January 27, 2020 04:20 — forked from ErikAugust/spectre.c
Spectre example code
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#ifdef _MSC_VER
#include <intrin.h> /* for rdtscp and clflush */
#pragma optimize("gt",on)
#else
#include <x86intrin.h> /* for rdtscp and clflush */
#endif
@jedisct1
jedisct1 / capsule_networks.py
Created November 11, 2017 12:52 — forked from kendricktan/capsule_networks.py
Clean Code for Capsule Networks
"""
Dynamic Routing Between Capsules
https://arxiv.org/abs/1710.09829
"""
import torch
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
import torchvision.transforms as transforms
@jedisct1
jedisct1 / vm-backup.sh
Last active September 13, 2017 17:37 — forked from cabal95/vm-backup.sh
I use this script to backup my QEMU/KVM/libVirt virtual machines. The script requires KVM 2.1+ since it uses the live blockcommit mode. This means the data in the snapshot disk is rolled back into the original instead of the other way around. Script does NOT handle spaces in paths.
#!/bin/sh
#
BACKUPDEST="$1"
DOMAIN="$2"
MAXBACKUPS="$3"
if [ -z "$BACKUPDEST" -o -z "$DOMAIN" ]; then
echo "Usage: ./vm-backup <backup-folder> <domain> [max-backups]"
exit 1

PHP-CLI (PHP en ligne de commande) sur les hébergements mutualisés OVH

(cli)

/usr/local/php5.3/bin/php  =>  PHP 5.3.29 (cli) (built: Mar  4 2016 09:03:42)
/usr/local/php5.4/bin/php  =>  PHP 5.4.45 (cli) (built: Apr 11 2016 06:20:17)
/usr/local/php5.5/bin/php  =>  PHP 5.5.35 (cli) (built: May  2 2016 07:16:01)
/usr/local/php5.6/bin/php  =>  PHP 5.6.21 (cli) (built: Apr 29 2016 07:02:48)
/usr/local/php7.0/bin/php =&gt; PHP 7.0.6 (cli) (built: Apr 29 2016 07:02:25) ( NTS )
@jedisct1
jedisct1 / tensorflow_gpu_gce_ubuntu_zesty.sh
Created May 31, 2017 10:15
Tensorflow 1.1 with CUDA 8.0 for GCE on Ubuntu 17.04
echo "deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list
curl https://bazel.build/bazel-release.pub.gpg | sudo apt-key add -
cd /tmp # the next part is specific to your setup
# Get it here: https://developer.nvidia.com/cudnn
gsutil cp gs://tn-devel-ds/ubuntu/libcudnn5* .
ls libcudnn*.deb | sort | xargs sudo dpkg -i
sudo apt update
sudo apt install libopenblas-dev liblapack-dev python3-pip python3-pandas python3-venv python3-werkzeug
@jedisct1
jedisct1 / irq_balance_habrahabr.sh
Created October 24, 2016 13:05 — forked from pavel-odintsov/irq_balance_habrahabr.sh
irq_balance_habrahabr.sh
#!/bin/bash
# from http://habrahabr.ru/post/108240/
ncpus=`grep -ciw ^processor /proc/cpuinfo`
test "$ncpus" -gt 1 || exit 1
n=0
for irq in `cat /proc/interrupts | grep eth | awk '{print $1}' | sed s/\://g`
do
f="/proc/irq/$irq/smp_affinity"