Skip to content

Instantly share code, notes, and snippets.

View vrosnet's full-sized avatar

Antony Ingram vrosnet

View GitHub Profile
#!/usr/bin/env bash
TCPDUMP_PID=""
SOCAT_PID=""
OUTPUT_FILE=""
PORT=12345
TMPDIR="."
TCPDUMP_PATH="/data/local/tmp/xbin/tcpdump"
NETCAT_PATH="/data/local/tmp/nc"
HOST_INTERFACE="en0"
c:\Windows\System32\certutil.exe -hashfile c:\full\path\to\file [HASH_ALGORITHM]
Supported HASH_ALGORITHMs are: MD2, MD4, MD5, SHA1, SHA256, SHA384, SHA512
# Show message box popup.
Add-Type -AssemblyName System.Windows.Forms
$result = [System.Windows.Forms.MessageBox]::Show("My message", "Window Title", [System.Windows.Forms.MessageBoxButtons]::OK, [System.Windows.Forms.MessageBoxIcon]::None)
# Show input box popup.
Add-Type -AssemblyName Microsoft.VisualBasic
$inputText = [Microsoft.VisualBasic.Interaction]::InputBox("Enter some value:", "Window Title", "Default value")
# Show an Open File Dialog and return the file selected by the user.
function Read-OpenFileDialog([string]$InitialDirectory, [switch]$AllowMultiSelect)
@vrosnet
vrosnet / go-min-server1.go
Created February 3, 2017 19:42 — forked from blinksmith/go-min-server1.go
Collection of Minimal Go web server
package main
import (
"net/http"
)
func main() {
http.Handle("/", http.FileServer(http.Dir(".")))
http.ListenAndServe(":8080", nil)
}
@vrosnet
vrosnet / google-search.user.js
Created February 3, 2017 19:41 — forked from blinksmith/google-search.user.js
google search url cleaner - userscript
// ==UserScript==
// @name google search url cleaner
// @author blinksmith
// @version 0.1
// @namespace https://gist.github.com/713fa531972fab77e5ad
// @description google search url cleaner
// @include https://encrypted.google.com/?*
// @include http://www.google.*/search?*
// @include https://www.google.*/search?*
// @grant none
@vrosnet
vrosnet / golang.udl.xml
Created February 2, 2017 15:28 — forked from blinksmith/golang.udl.xml
Notepad++ Syntax Highlight for Go
<NotepadPlus>
<UserLang name="Golang" ext="go" udlVersion="2.1">
<!--
NPP Syntax Highlight for Go
using most used color in NPP for Golang.
Author: blinksmith Version: 0.1.2
Last tested in Notepad++ v6.9
Easy Install :
Go to [Language] -> [Define your language...] -> [Import]. Import this file and restart NPP.
@vrosnet
vrosnet / node-and-npm-in-30-seconds.sh
Created January 12, 2017 05:00 — forked from isaacs/node-and-npm-in-30-seconds.sh
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
@vrosnet
vrosnet / gist:eb98ea2ef6735ca4976198f244f11f97
Created November 3, 2016 00:51 — forked from marineam/gist:6557621
CoreOS Profile Refactor
INFO amd64-host : Portage 2.1.12.2 (releases/10.0, gcc-4.6.3, glibc-2.15-r3, 3.10.11-stable x86_64)
INFO amd64-host : =================================================================
INFO amd64-host : System uname: Linux-3.10.11-stable-x86_64-Intel-R-_Core-TM-_i7-3770_CPU_@_3.40GHz-with-gentoo-73.0.0
INFO amd64-host : KiB Swap: 7842812 total, 7842812 free
INFO amd64-host : Timestamp of tree: Unknown
INFO amd64-host : ld GNU ld (GNU Binutils) 2.23.1
INFO amd64-host : ccache version 3.1.6 [disabled]
INFO amd64-host : app-shells/bash: 4.2_p20
INFO amd64-host : dev-lang/python: 2.7.5-r2::coreos
INFO amd64-host : dev-util/ccache: 3.1.6
@vrosnet
vrosnet / mac-curl-ca-bundle.sh
Created October 7, 2016 11:52 — forked from 1stvamp/mac-curl-ca-bundle.sh
Script to install cURL CA certificates on OS X without macports
#!/bin/bash
mkdir /tmp/curl-ca-bundle
cd /tmp/curl-ca-bundle
wget http://curl.haxx.se/download/curl-7.22.0.tar.bz2
tar xzf curl-7.22.0.tar.bz2
cd curl-7.22.0/lib/
./mk-ca-bundle.pl
if [ ! -d /usr/share/curl/ ]; then
sudo mkdir -p /usr/share/curl/
else
@vrosnet
vrosnet / .gitconfig_alias
Created October 5, 2016 08:00 — forked from ilyar/.gitconfig_alias
Useful Git alias
[alias]
co = checkout
ci = commit
st = status
br = branch
cp = cherry-pick
hist = log --pretty=format:\"%Cblue%h%Creset %ad %Cgreen%s %Cred%an%n%d\" --graph --date=rfc
glog = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
ref = log -n 1 --pretty=format:%h --