Skip to content

Instantly share code, notes, and snippets.

View magnusstubman's full-sized avatar

Magnus Stubman magnusstubman

View GitHub Profile
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<HTA:APPLICATION
SHOWINTASKBAR="no"
/>
</head>
<script language="VBScript">
@magnusstubman
magnusstubman / cobalt-strike.vbs
Created February 3, 2021 20:05
Cobalt Strike 4.2 default macro
Private Type PROCESS_INFORMATION
hProcess As Long
hThread As Long
dwProcessId As Long
dwThreadId As Long
End Type
Private Type STARTUPINFO
cb As Long
lpReserved As String
#!/usr/bin/python3
import sys
import fileinput
h = bytes(sys.stdin.buffer.read()).hex()
n = 2
output = ''
#!/usr/bin/python3
import sys
import fileinput
h = bytes(sys.stdin.buffer.read()).hex()
n = 2
output = ''
@magnusstubman
magnusstubman / gettemp.sh
Created December 4, 2018 11:16
raspbian raspberry pi temperature
#!/bin/bash
cpu=$(cat /sys/class/thermal/thermal_zone0/temp | sed 's/./&./2')
echo "cpu $cpu c"
gpu=$(/opt/vc/bin/vcgencmd measure_temp | cut -d'=' -f2 | cut -d"'" -f1)
echo "gpu $gpu c"
@magnusstubman
magnusstubman / gist:8ec50f60132aaf4c0bbd
Created October 30, 2014 10:23
Loop through available fonts and print them out
for family in UIFont.familyNames() {
print("Family: ")
println(family)
for font in UIFont.fontNamesForFamilyName(family as NSString) {
print(" name: ")
println(font)
}
}
### Keybase proof
I hereby claim:
* I am magnusstubman on github.
* I am magnusstubman (https://keybase.io/magnusstubman) on keybase.
* I have a public key whose fingerprint is 1757 1BD2 3889 56DA 3741 AF76 AD8F 56BE E364 A5D7
To claim this, I am signing this object:
[~/dev/dockerplay/tut] docker version
Client version: 0.11.1
Client API version: 1.11
Go version (client): go1.2.1
Git commit (client): fb99f99
Server version: 0.11.1
Server API version: 1.11
Git commit (server): fb99f99
Go version (server): go1.2.1
[~/dev/dockerplay/tut] docker build .

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert $1 -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 $2

Results