Skip to content

Instantly share code, notes, and snippets.

View jms1989's full-sized avatar

Michael SanAngelo jms1989

View GitHub Profile
@jms1989
jms1989 / .screenrc
Created January 3, 2017 23:36 — forked from joaopizani/.screenrc
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
@jms1989
jms1989 / .screenrc-main-example
Created January 3, 2017 23:43 — forked from ChrisWills/.screenrc-main-example
A nice default screenrc
# GNU Screen - main configuration file
# All other .screenrc files will source this file to inherit settings.
# Author: Christian Wills - [email protected]
# Allow bold colors - necessary for some reason
attrcolor b ".I"
# Tell screen how to set colors. AB = background, AF=foreground
termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'
@jms1989
jms1989 / trim_pfsense2.2.4.md
Created April 23, 2017 16:40 — forked from mdouchement/trim_pfsense2.2.4.md
Enable TRIM on pfsense 2.2.4

Installation

Use memstick-licecd to install pfsense on your SSD.

Enable TRIM

  • Initialize fstab:
[2.2.4-RELEASE][[email protected]]/root: /usr/local/sbin/ufslabels.sh

It may do nothing because all is already initialize but it's only in a case of

# -----------------$HOME/.abcde.conf----------------- #
#
# A sample configuration file to convert music cds to
# Ogg Vorbis using abcde version 2.7.2
#
# http://andrews-corner.org/linux/index.html
# -------------------------------------------------- #
# Encode tracks immediately after reading. Saves disk space, gives
# better reading of 'scratchy' disks and better troubleshooting of
#!/bin/bash
#################################################################################
# Script to convert M4A to FLAC, OGG, and MP3 VBR #
# #
# Author: Michael SanAngelo ([email protected] #
# #
# Requires: avconv, lame, vorbis-tools, glyrc, flac2all.py #
# #
# https://raw.githubusercontent.com/ZivaVatra/flac2all/master/stable/flac2all.py #
##################################################################################
gistup
#!/bin/bash
# SOURCE: https://unix.stackexchange.com/revisions/463214/4
#
# Compare two directories using rsync and print the differences
# CAUTION: options MUST appear after the directories
#
# SYNTAX
#---------
# diff-dirs Left_Dir Right_Dir [options]
#
@echo off
if exist "C:\Program Files\Oracle\VirtualBox" set path="%path%;C:\Program Files\Oracle\VirtualBox"
set file=%1
set /A size=%2
echo Converting VMDK to VDI
VBoxManage clonemedium "%file%.vmdk" "%file%.vdi" --format vdi
echo Resizing Image
VBoxManage modifymedium "%file%.vdi" --resize %size%
if exist "%file%_resized.vmdk" (
@jms1989
jms1989 / convert.sh
Created July 13, 2019 23:11
compress folder and contents into 7z
x="$1" ; 7z a -mx0 "$x".7z "$x"; rm -r "$x";
@jms1989
jms1989 / count-extensions.sh
Created July 13, 2019 23:12
count extensions
find "$1" -type f | sed -e 's/.*\.//' | sort | uniq -c