Skip to content

Instantly share code, notes, and snippets.

View ruxkor's full-sized avatar

Andor Goetzendorff ruxkor

View GitHub Profile
@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 / 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()
@ruxkor
ruxkor / 0. nginx_setup.sh
Created March 29, 2020 22:32 — forked from mikhailov/0. nginx_setup.sh
Nginx + secure pseudo-streaming
# Nginx can serve FLV/MP4 files by pseudo-streaming way without any specific media-server software.
# To do the custom build we use 2 modules: --with-http_secure_link_module --with-http_flv_module
# This module "secure-link" helps you to protect links from stealing away.
#
# NOTE: see more details at coderwall: http://coderwall.com/p/3hksyg
cd /usr/src
wget http://nginx.org/download/nginx-1.5.13.tar.gz
tar xzvf ./nginx-1.5.13.tar.gz && rm -f ./nginx-1.5.13.tar.gz
@ruxkor
ruxkor / delete_registry_image.sh
Created August 2, 2018 13:52
delete a specific image in your docker registry
#!/bin/bash
# set the following variables
REGISTRY_HOSTNAME=
REGISTRY_USER=
REGISTRY_PASSWORD=
REGISTRY_IMAGE=
REGISTRY_IMAGE_TAG=
# if you don't know, get the tags first
@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"
@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 / 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 / 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

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:

# 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