Skip to content

Instantly share code, notes, and snippets.

View Fastidious's full-sized avatar
🐵
Just another one.

Fastidious Fastidious

🐵
Just another one.
View GitHub Profile
@Fastidious
Fastidious / Mavericks-Boot.txt
Last active August 29, 2015 14:07
Create Mavericks Bootable USB
sudo /Applications/Install\ OS\ X\ Mavericks.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /Applications/Install\ OS\ X\ Mavericks.app --nointeraction
@Fastidious
Fastidious / tunnel.sh
Last active June 3, 2016 18:04 — forked from m3nt0r/proxy-toggle.sh
Starts/Stops an SSH Tunnel and SOCKS Proxy on OS X.
#!/bin/sh
SSH_HOST=user@host # Change this accordingly.
SSH_PORT=22 # If SSH server is listening on different port, change this.
PROXY_INTERFACE="Ethernet" # Change this to Wi-Fi, if you are on wireless, or to whatever your NIC is.
PROXY_HOST=localhost # This doesn't change.
PROXY_PORT=8080 # Pick a different port if you like.
if [[ $1 == "start" ]]; then
ssh -D $PROXY_PORT -f -C -q -N $SSH_HOST -p$SSH_PORT
@Fastidious
Fastidious / create_dmg.txt
Created November 17, 2014 19:23
Create a DMG
hdiutil create -format UDZO -srcfolder folder_to_compress archive_name.dmg
@Fastidious
Fastidious / show-all-256-colors.py
Last active August 29, 2015 14:10 — forked from mgedmin/show-all-256-colors.py
Print a swatch using all 256 colors of 256-color-capable terminals.
#!/usr/bin/python
"""Print a swatch using all 256 colors of 256-color-capable terminals."""
__author__ = "Marius Gedminas <[email protected]>"
__url__ = "https://gist.github.com/mgedmin/2762225"
__version__ = '2.0'
def hrun(start, width, padding=0):
@Fastidious
Fastidious / ssl-crt.md
Last active October 4, 2017 11:45
[Creating SSL CRT] SSL CRT with proper security.

SSL CRT for proper security

To generate a Certificate Sign Request with SHA256 hashing algorithm and 4096 bits encryption key with openssl:

openssl genrsa -out example.com.key 4096
openssl req -new -sha256 -key example.com.key -out example.com.csr

Or all in one:

@Fastidious
Fastidious / powershell-execution.md
Last active October 4, 2017 11:44
Powershell execution

Run unsigned powershell scripts

Set-ExecutionPolicy RemoteSigned

To allow pwshell scripts to run, and:

Set-ExecutionPolicy Restricted
@Fastidious
Fastidious / extract-files-from-msi.txt
Created February 12, 2015 15:09
Extract files from an .msi
msiexec /a PathToMSIFile /qb TARGETDIR=DirectoryToExtractTo
@Fastidious
Fastidious / sublime-conf
Created April 12, 2015 17:29
Sublime Text Configuration
{
"theme": "Afterglow.sublime-theme",
"color_scheme": "Packages/Theme - Afterglow/Afterglow.tmTheme",
"tabs_small": true,
"sidebar_size_12": true,
"sidebar_row_padding_medium": true,
"status_bar_brighter": true,
"color_inactive_tabs": true,
"tabs_padding_small": true,
"font_face": "Inconsolata-g"
@Fastidious
Fastidious / most-useful-thing-in-bash
Created April 13, 2015 00:49
Most useful thing in Bash
Create ~/.inputrc and fill it with this:
"\e[A": history-search-backward
"\e[B": history-search-forward
# -p get all images, etc. needed to display HTML page.
# --mirror turns on recursion and time-stamping, sets infinite
# recursion depth and keeps FTP directory listings
# --html-extension save HTML docs with .html extensions
# --convert-links make links in downloaded HTML point to local files.
wget --mirror -p --html-extension --convert-links www.example.com