Skip to content

Instantly share code, notes, and snippets.

View CapacitorSet's full-sized avatar

Giulio Muscarello CapacitorSet

View GitHub Profile
@denji
denji / README.md
Last active March 7, 2024 08:15 — forked from Cubixmeister/README.md
Simple Sentry docker-compose.yml
  1. Download docker-compose.yml to dir named sentry
  2. Change SENTRY_SECRET_KEY to random 32 char string
  3. Run docker-compose up -d
  4. Run docker-compose exec sentry sentry upgrade to setup database and create admin user
  5. (Optional) Run docker-compose exec sentry pip install sentry-slack if you want slack plugin, it can be done later
  6. Run docker-compose restart sentry
  7. Sentry is now running on public port 9000
@cboettig
cboettig / Caddyfile
Created December 31, 2015 18:41
Caddyserver proxy for Jupyter
https://example.com {
proxy / jupyter:8888 {
proxy_header X-Real-IP {remote}
proxy_header Host {host}
}
proxy {{.PathMatches "~* /(api/kernels/[^/]+/(channels|iopub|shell|stdin)|terminals/websocket)/?"}} jupyter:8888 {
proxy_header X-Real-IP {remote}
@OmeGak
OmeGak / cern_afs_kerberos.md
Last active January 23, 2024 14:52
Authentication at CERN made not-an-ordeal (kind of)

AFS Kerberos at CERN

"Kerberos is not the authentication system CERN deserves, but the one we need". - A wise man

This guide aims to ease the pain of setting up Kerberos authentication in your local (Ubuntu) machine and then completely forget about it.

Ready to fight?

First of all, install the following packages if you want to be successful on this journey:

# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/
# generate server.xml with the following command:
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
# run as follows:
# python simple-https-server.py
# then in your browser, visit:
# https://localhost:4443
import BaseHTTPServer, SimpleHTTPServer
import ssl
@thigm85
thigm85 / simple_neural_network_diagram
Created May 26, 2013 15:10
Graphviz script to draw a simple neural network diagram. Copy this to a `file.txt` file and then run `dot -Tpng -O file.txt` from command-line to get a .png figure with the diagram.
digraph G {
rankdir=LR
splines=line
node [fixedsize=true, label=""];
subgraph cluster_0 {
color=white;
node [style=solid,color=blue4, shape=circle];
@KartikTalwar
KartikTalwar / Documentation.md
Last active March 25, 2024 17:40
Rsync over SSH - (40MB/s over 1GB NICs)

The fastest remote directory rsync over ssh archival I can muster (40MB/s over 1gb NICs)

This creates an archive that does the following:

rsync (Everyone seems to like -z, but it is much slower for me)

  • a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
  • H: preserves hard-links
  • A: preserves ACLs
@bcse
bcse / scrdec18-VC8.exe
Created February 15, 2012 10:13
Windows Script Decoder 1.8 (Decoding JScript.Encoded)