Skip to content

Instantly share code, notes, and snippets.

View ruxkor's full-sized avatar

Andor Goetzendorff ruxkor

View GitHub Profile
@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)

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
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
@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()
<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 / 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