Skip to content

Instantly share code, notes, and snippets.

View rwenz3l's full-sized avatar
🔨
Building new Things.

Robin Wenzel rwenz3l

🔨
Building new Things.
  • Germany
View GitHub Profile
@premek
premek / mv.sh
Last active March 5, 2024 17:43
Rename files in linux / bash using mv command without typing the full name two times
# Put this function to your .bashrc file.
# Usage: mv oldfilename
# If you call mv without the second parameter it will prompt you to edit the filename on command line.
# Original mv is called when it's called with more than one argument.
# It's useful when you want to change just a few letters in a long name.
#
# Also see:
# - imv from renameutils
# - Ctrl-W Ctrl-Y Ctrl-Y (cut last word, paste, paste)
@yaroslavvb
yaroslavvb / show_graph
Created December 30, 2016 01:50
Visualizing graph in Jupyter notebook
# make things wide
from IPython.core.display import display, HTML
display(HTML("<style>.container { width:100% !important; }</style>"))
from IPython.display import clear_output, Image, display, HTML
def strip_consts(graph_def, max_const_size=32):
"""Strip large constant values from graph_def."""
strip_def = tf.GraphDef()
for n0 in graph_def.node:
@codekoala
codekoala / export_chrome_passwords.js
Last active June 24, 2023 11:54
Dump all passwords saved in Google Chrome (tested with Chrome 56.0.2906.0 on Arch Linux)
// Modified version of https://github.com/megmage/chrome-export-passwords
//
// This script allows you to dump all of the passwords stored in your Chrome
// profile. I tested it with Chrome 56.0.2906.0 dev (64-bit) on Arch Linux and
// it worked quite well.
//
// Usage:
//
// - Navigate to chrome://settings-frame/passwords
// - Copy this code into a snippet in Chrome
anonymous
anonymous / GAME_MASTER_v0_1.protobuf
Created July 16, 2016 16:31
Pokemon Go decoded GAME_MASTER protobuf file v0.1
Result: 1
Items {
TemplateId: "BADGE_BATTLE_ATTACK_WON"
Badge {
BadgeType: BADGE_BATTLE_ATTACK_WON
BadgeRanks: 4
Targets: "\nd\350\007"
}
}
Items {
@thbkrkr
thbkrkr / gen-ssl.sh
Created April 7, 2015 16:15
Generate Self-Signed SSL Certificate without prompt
# Generate a passphrase
openssl rand -base64 48 > passphrase.txt
# Generate a Private Key
openssl genrsa -aes128 -passout file:passphrase.txt -out server.key 2048
# Generate a CSR (Certificate Signing Request)
openssl req -new -passin file:passphrase.txt -key server.key -out server.csr \
-subj "/C=FR/O=krkr/OU=Domain Control Validated/CN=*.krkr.io"
@JamesMGreene
JamesMGreene / gitflow-breakdown.md
Last active June 6, 2025 14:36
`git flow` vs. `git`: A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository

@JimHaughwout
JimHaughwout / dedupe_csv.py
Last active January 16, 2021 17:58
Remove duplicates from file. Intended for removal of duplicate data from CSV files (e.g., file of sensor reads).
#! /usr/bin/env python
"""
Remove duplicates rows from comma-separate value files.
Recommended for files saved in Windows CSV format.
Useful for situations where you will have duplicate data (e.g., sensor reads)
: param source : source csv file. Must end in .csv
Result is destination csv file without duplicates.
@hogjonny
hogjonny / mayaSave.py
Last active October 5, 2022 15:23
maya, check for 'unsaved changes', if there are ... save before proceeding:
import maya.cmds as mc
# check if there are unsaved changes
fileCheckState = mc.file(q=True, modified=True)
# if there are, save them first ... then we can proceed
if fileCheckState:
print 'Need to save.'
# This is maya's native call to save, with dialogs, etc.
# No need to write your own.
@willurd
willurd / web-servers.md
Last active July 14, 2025 21:19
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@KartikTalwar
KartikTalwar / Documentation.md
Last active July 11, 2025 14:49
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