Skip to content

Instantly share code, notes, and snippets.

View selftaught's full-sized avatar

selftaught selftaught

  • Bluehost
  • Portland
View GitHub Profile
@selftaught
selftaught / tmux-cheatsheet.markdown
Created October 23, 2015 02:46 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@selftaught
selftaught / injector.cpp
Created March 21, 2016 01:27 — forked from Zoxc/injector.cpp
DLL Injector for x86/x64
#pragma once
#include <SDKDDKVer.h>
#define WIN32_LEAN_AND_MEAN
#define NOMINMAX
#include <windows.h>
#include <tchar.h>
#include <shellapi.h>
#include <string>
#include <sstream>
#include <functional>
@selftaught
selftaught / SecureSessionHandler.php
Created November 13, 2016 08:27 — forked from eddmann/SecureSessionHandler.php
Secure session handler implementation.
<?php
class SecureSessionHandler extends SessionHandler {
protected $key, $name, $cookie;
public function __construct($key, $name = 'MY_SESSION', $cookie = [])
{
$this->key = $key;
$this->name = $name;
/*
* CVE-2016-5195 dirtypoc
*
* This PoC is memory only and doesn't write anything on the filesystem.
* /!\ Beware, it triggers a kernel crash a few minutes.
*
* gcc -Wall -o dirtycow-mem dirtycow-mem.c -ldl -lpthread
*/
#define _GNU_SOURCE
@selftaught
selftaught / .remote-backup-excludes.txt
Created January 23, 2017 22:43 — forked from wrouesnel/.remote-backup-excludes.txt
A script for performing a remote backup to another server using rsync and bup for versioning.
# this is an rsync-excludes format list of files to exclude.
@selftaught
selftaught / xrandr.sh
Created February 2, 2017 03:19 — forked from debloper/xrandr.sh
Add system unrecognized but monitor supported resolution in X
#!/bin/bash
# First we need to get the modeline string for xrandr
# Luckily, the tool `gtf` will help you calculate it.
# All you have to do is to pass the resolution & the-
# refresh-rate as the command parameters:
gtf 1920 1080 60
# In this case, the horizontal resolution is 1920px the
# vertical resolution is 1080px & refresh-rate is 60Hz.
@selftaught
selftaught / youtube-dl-download-pluralsight.md
Created May 11, 2017 20:41 — forked from munim/youtube-dl-download-pluralsight.md
youtube-dl to download pluralsight videos

Download Plural Sight videos

Software required:

youtube-dl

After installation and putting the youtube-dl in PATH

youtube-dl \
#!/bin/bash
# Install tcpdump on a Tomato firmware router
cd /tmp && wget http://www.dslreports.com/r0/download/1376456~0df06f4164393e0fdd2aa2eede183328/tcpdump.zip && unzip tcpdump.zip && chmod +x tcpdump && rm tcpdump.zip
@selftaught
selftaught / bash.generate.random.alphanumeric.string.sh
Created September 12, 2017 09:55 — forked from earthgecko/bash.generate.random.alphanumeric.string.sh
shell/bash generate random alphanumeric string
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1
____
_________ / _/___ ___ _____
/ ___/ __ \ / // __ \/ _ \/ ___/
(__ ) / / // // /_/ / __/ /
/____/_/ /_/___/ .___/\___/_/
/_/
+ -- --=[http://crowdshield.com