Skip to content

Instantly share code, notes, and snippets.

View cpasternack's full-sized avatar

Collin Pasternack cpasternack

View GitHub Profile
# From http://www.joescat.com/backup/disk_image.html
mount -o username=name,password=secret //server/share backup
dd if=/dev/sda | gzip -c | split -b 638m - backup/backup.img.gz.
# Restoration
cat backup/backup.img.gz.* | gzip -dc | dd of=/dev/sda
@eddiejaoude
eddiejaoude / README.md
Last active February 22, 2024 13:32
Install Firefox addon/extension with no user interaction
@jhazelwo-charter
jhazelwo-charter / nginx.conf
Created October 3, 2017 14:54
NGINX FreeIPA authentication
worker_processes 4;
pid /app/run/nginx.pid;
error_log /app/log/error.log;
events {
worker_connections 768;
}
http {
@joaopizani
joaopizani / .screenrc
Created May 17, 2012 11:55
A killer GNU Screen Config
# the following two lines give a two-line status, with the current window highlighted
hardstatus alwayslastline
hardstatus string '%{= kG}[%{G}%H%? %1`%?%{g}][%= %{= kw}%-w%{+b yk} %n*%t%?(%u)%? %{-}%+w %=%{g}][%{B}%m/%d %{W}%C%A%{g}]'
# huge scrollback buffer
defscrollback 5000
# no welcome message
startup_message off
@kn9ts
kn9ts / GPLv3.md
Last active March 8, 2024 07:26
GPLv3 explained

GPL3 LICENSE SYNOPSIS

TL;DR* Here's what the license entails:

1. Anyone can copy, modify and distribute this software.
2. You have to include the license and copyright notice with each and every distribution.
3. You can use this software privately.
4. You can use this software for commercial purposes.
5. If you dare build your business solely from this code, you risk open-sourcing the whole code base.
@earthgecko
earthgecko / bash.generate.random.alphanumeric.string.sh
Last active April 2, 2024 15:59
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-z0-9' | fold -w 32 | head -n 1