Skip to content

Instantly share code, notes, and snippets.

View ruxkor's full-sized avatar

Andor Goetzendorff ruxkor

View GitHub Profile
@ruxkor
ruxkor / git-relevant-files.py
Created February 1, 2012 01:06
get the most changed files of a git repository by analyzing its log
#!/usr/bin/env python
# Usage:
# pipe, or pass as a file something identical to the
# following command:
#
# git log --pretty="format:COMMIT %h %at %f" --numstat
#
#
#
@ruxkor
ruxkor / mount-ecryptfs-dir.sh
Created February 6, 2012 12:03
mount ecryptfs home directory
#!/bin/bash
# ecryptFS mount script
# taken and slightly modified version
# original at http://superuser.com/questions/227713/ecryptfs-how-to-mount-a-backup-of-an-encrypted-home-dir
# ROOT should be the parent of the .ecryptfs and .Private folders
if [ ! -d "$1" -o "$2" == "" ]; then
echo "usage: $0 /home/.ecryptfs/USER /mnt/USER"
exit 1
@ruxkor
ruxkor / cmp.coffee
Last active June 6, 2017 11:23
sensible comparison function for js
# comparison function, checking also the contents of elements if we are comparing 2 arrays.
# very useful for sorting.
cmp = (a,b) ->
typemap =
'null': 0
'undefined': 0
'number': 1
'string': 1
'object': 2
<html>
<head>
<title>Magenta</title>
</head>
<body>
<h2>Magenta</h2>
<div id="loading">Loading &hellip;</div>
<canvas id="cvs" width="600" height="600"></canvas>
@ruxkor
ruxkor / idadif.py
Last active October 14, 2022 05:39
Small IDA .dif patcher Original Source: https://stalkr.net/files/ida/idadif.py
#!/usr/bin/env python
# Small IDA .dif patcher
# Source: https://stalkr.net/files/ida/idadif.py
import re
from sys import argv,exit
def patch(file, dif, revert=False):
code = open(file,'rb').read()
import gc
from greenlet import greenlet
import traceback
def dumpGreenlets():
for ob in gc.get_objects():
if not isinstance(ob, greenlet):
continue
if not ob:
continue
# checkinstall makefile for tigervnc's precompiled tarball
# expects the extracted files to be in a folder named 'build'
# save this file as Makefile and checkinstall as usual.
noop:
install:
find build -type d | sort | sed "s,^build,," | while read l; do ls $$l >/dev/null 2>/dev
find build -type f | sed -r "s,build(.*),\0 \1," | while read l; do cp -a $$l; done

Keybase proof

I hereby claim:

  • I am ruxkor on github.
  • I am ruxkor (https://keybase.io/ruxkor) on keybase.
  • I have a public key ASAL7SX6GrU8Z_N2zKyAQZ4vopKQ8dx6fWYgHOyHbYaLyAo

To claim this, I am signing this object:

@ruxkor
ruxkor / 0.Notes.md
Created January 3, 2018 20:29 — forked from C-Duv/0.Notes.md
Example for Docker Swarm, Let's Encrypt and Nginx setup with no Nginx down time (answer to https://twitter.com/developius/status/892470102632923136)
@ruxkor
ruxkor / install_azurefile_dockervolumedriver.sh
Last active March 12, 2018 15:23
Install the azurefile docker volume driver on ubuntu with systemd
#!/bin/bash -e
# Run with `sudo`
STORAGEACCOUNT_NAME=$1
STORAGEACCOUNT_KEY=$2
if [ -z "$1" ]; then echo "Storage Account Name not set..." && exit 2 ; fi
if [ -z "$2" ]; then echo "Storage Account Key not set..." && exit 2 ; fi
echo "# Install CIFS"