Skip to content

Instantly share code, notes, and snippets.

Erwan SEITE wanix

Block or report user

Report or block wanix

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View kafka-cheat-sheet.md

Kafka Topics

List existing topics

bin/kafka-topics.sh --zookeeper localhost:2181 --list

Purge a topic

bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic mytopic --config retention.ms=1000

... wait a minute ...

bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic mytopic --delete-config retention.ms

@wanix
wanix / nvidia_get_latest.sh
Created May 25, 2018
Get the latest nvidia proprietary driver for Linux and copy it in /usr/local/src
View nvidia_get_latest.sh
#!/bin/sh
# install me in usr/local/sbin/nvidia_get_latest.sh
set -e
latest_version=$(curl -s https://download.nvidia.com/XFree86/Linux-$(uname -m)/latest.txt | cut -d ' ' -f 2)
echo "Latest version found: ${latest_version}"
nvidia_filename=/usr/local/src/$(echo ${latest_version} | rev | cut -d '/' -f 1 | rev)
if [ ! -f ${nvidia_filename} ];
then
echo "Downloading ${nvidia_filename}"
curl https://download.nvidia.com/XFree86/Linux-$(uname -m)/${latest_version} -o ${nvidia_filename}
@wanix
wanix / anonymize_email.py
Created Feb 2, 2018 — forked from Xowap/anonymize_email.py
A script to anonymize emails in a SQL dump
View anonymize_email.py
#!/usr/bin/env python3
# coding: utf-8
import argparse
import re
from uuid import uuid4
from hashlib import sha256
SALT = str(uuid4()).encode()
@wanix
wanix / run.tpl
Created Feb 24, 2017 — forked from hervenicol/run.tpl
`docker inspect` template to regenerate the `docker run` command that created a container
View run.tpl
docker run \
--name={{.Name}} \
{{range $e := .Config.Env}}--env={{printf "%q" $e}} \
{{end}}{{range $p, $conf := .NetworkSettings.Ports}}{{with $conf}}-p {{(index $conf 0).HostIp}}:{{(index $conf 0).HostPort}}:{{$p}} \
{{end}}{{end}}{{range $n, $conf := .NetworkSettings.Networks}}{{with $conf}}--network {{printf "%q" $n}} \
{{range $conf.Aliases}}--network-alias {{printf "%q" .}} {{end}} \
{{end}}{{end}}{{range $v := .HostConfig.VolumesFrom}}--volumes-from={{printf "%q" .}} \
{{end}}{{range $v := .HostConfig.Binds}}--volume={{printf "%q" .}} \
{{end}}{{range $l, $v := .Config.Labels}}--label {{printf "%q" $l}}={{printf "%q" $v}} \
{{end}}{{range $v := .HostConfig.CapAdd}}--cap-add {{printf "%q" .}} \
@wanix
wanix / README.md
Last active Aug 8, 2016 — forked from christiangalsterer/README.md
Dashing Jira Agile Sprint Remaining Widget
View README.md
@wanix
wanix / README.md
Created Jul 21, 2016 — forked from s0enke/README.md
Dashing Cloudwatch
View README.md

This is an adjusted version of EC2 CloudWatch stats for Dashing which is not bound to EC2 metrics but a generic widget for cloudwatch graphs. Visualization is done by Rickshawgraph as in the original example.

You can’t perform that action at this time.