Skip to content

Instantly share code, notes, and snippets.

View opexxx's full-sized avatar

Alexander Knorr opexxx

View GitHub Profile
@jocelyn
jocelyn / update_nirsoft.bat
Created November 5, 2008 14:21
dummy script to download nirsoft and sysinternals tools
setlocal
mkdir nirsoft
cd nirsoft
set URL=http://www.nirsoft.net/utils
rem list from http://www.nirsoft.net/pad/pad-links.txt
wget %URL%/acm.zip
wget %URL%/addrview.zip
wget %URL%/astlog.zip
#!/bin/sh
#
# Create thumbnails of a PDF file
#
# Author: Fajran Iman Rusadi <fajran@gmail.com>
# License: Public domain
# Requirements: poppler-utils imagemagick
@danmackinlay
danmackinlay / supervisord.sh
Created August 27, 2009 07:07
an init.d script for supervisord
#! /bin/sh
### BEGIN INIT INFO
# Provides: supervisord
# Required-Start: $remote_fs
# Required-Stop: $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Example initscript
# Description: This file should be used to construct scripts to be
# placed in /etc/init.d.
@Oshuma
Oshuma / mac.zsh
Created October 11, 2009 01:58
mac.zsh
# ----------------------
# variables
# ----------------------
PATH="$PATH:/opt/local/bin:/opt/local/sbin:/usr/games:/usr/local/mysql/bin:/usr/local/sbin"
MANPATH="$MANPATH:/opt/local/man"
IRB_HISTORY_FILE=$HOME/.irb_history
LESS='-M -R -X'
# ----------------------

PuTTY Session Manager

Installation

Make sure putty.exe is in your PATH (or put it in C:Windows)

Install dependencies:

C:\ gem install sinatra haml win32-open3
@actaneon
actaneon / signPowershell.ps1
Created January 3, 2010 20:43
Sign Powershell Script
#Enable Signed Scripts
#Set-ExecutionPolicy AllSigned
#Create Trusted Root CA
#makecert -n "CN=PowerShell Local Certificate Root" -a sha1 -eku 1.3.6.1.5.5.7.3.3 -r -sv root.pvk root.cer -ss Root -sr localMachine
#Create Personal Cert
#makecert -pe -n "CN=PowerShell User" -ss MY -a sha1 -eku 1.3.6.1.5.5.7.3.3 -iv root.pvk -ic root.cer
#! /usr/bin/env sh
for master in $(nmblookup -M -- - | grep -v '^querying' | awk '{ print $1 }'); do
smbclient -U% -L $master 2>&1 1>/dev/null | grep '^Domain=' | head -n 1 | awk '{ split( $1, field, /[\[\]]/); print field[2] }'
done
# Download Zenoss Source
wget http://downloads.sourceforge.net/project/zenoss/zenoss-2.5%20%28Latest%20Stable%29/zenoss-2.5.1/zenoss-2.5.1.tar.gz
# Extract the wmi directory
tar zxvf zenoss-2.5.1.tar.gz
cd zenoss-2.5
tar zxvf
cd
# Install autoconf
sudo aptitude install autoconf
# Patch the GNUmakefile
@tvwerkhoven
tvwerkhoven / randmac.sh
Created April 5, 2010 19:59
Generate a random MAC address
#!/bin/bash
#
# Generate a random MAC address with a known vendor prefix from the nmap mac
# prefixes file.
#
# Tim van Werkoven, 20100405 <t.i.m.vanwerkhoven@xs4all.nl>
# This file is licensed under the Creative Commons Attribution-Share Alike
# license versions 3.0 or higher, see
# http://creativecommons.org/licenses/by-sa/3.0/
@keithshep
keithshep / bash-cheats.sh
Last active February 13, 2022 02:39
bash shell cheats
#!/bin/bash
# exit on error and don't allow the use of unset variables
set -o errexit
set -o nounset
#NOTE: you can find a list of special variables at http://tldp.org/LDP/abs/html/internalvariables.html
# quietly execute GUI applications
function quietly() {