Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
set -e
# Get a list of groups a user is a member of on one line, space-seperated
# Single-quote group names with spaces, otherwise print the rest
SPACE_CHAR='-'
TMP=`mktemp`
hostname=""
baseDN=""
@rghose
rghose / install_opencv2.4.8.sh
Last active August 29, 2015 14:00 — forked from mitmul/install_opencv2.4.8.sh
This will make opencv
#! /bin/bash
sudo yum install -y gcc g++ gtk+-devel libjpeg-devel libtiff-devel jasper-devel libpng-devel zlib-devel cmake unzip
sudo yum install -y yum-priorities
wget http://ftp-srv2.kddilabs.jp/Linux/distributions/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm
sudo rpm -ivh epel-release-6-8.noarch.rpm
sudo yum install -y eigen3-devel —enablerepo=epel
pip install numpy
wget http://downloads.sourceforge.net/project/opencvlibrary/opencv-unix/2.4.8/opencv-2.4.8.zip
unzip opencv-2.4.8
@rghose
rghose / stackshot.sh
Created July 18, 2017 14:12
Generate stack trace of a running process on OS X
# Written by Cheng Zhao([email protected]).
# Published under Public Domain.
# Usage: stackshot.sh pid
# Path to stackshot tool.
STACKSHOT='/usr/libexec/stackshot'
# Path to symbolicated report.
TRACEFILE='/Library/Logs/stackshot-syms.log'
@rghose
rghose / ghe-revealer.rb
Last active March 6, 2025 17:20 — forked from iscgar/ghe-revealer.rb
Works with GHE3.13 as well
#!/usr/bin/sudo ruby
#
# revealer.rb -- Deobfuscate GHE .rb files.
#
# This is simple:
# Every obfuscated file in the GHE VM contains the following code:
#
# > require "ruby_concealer.so"
# > __ruby_concealer__ "..."