Skip to content

Instantly share code, notes, and snippets.

View thejmazz's full-sized avatar

Julian Mazzitelli thejmazz

View GitHub Profile
@thejmazz
thejmazz / preamble.tex
Last active August 29, 2015 14:16
My current preamble.tex I use for all my class notes and assignments.
\documentclass[letterpaper]{article}
% Geometry
\usepackage[letterpaper, top=2.54cm, bottom=2.54cm, left=2.54cm, right=2.54cm]{geometry}
% Fancy Header
\usepackage{fancyhdr}
% Change header bottom bar thickness
\renewcommand{\headrulewidth}{0pt}
@thejmazz
thejmazz / flatuicolors.js
Last active August 29, 2015 14:19
JavaScript arrays of http://flatuicolors.com/ in different formats
var flatUIColors = [ '#1abc9c', '#16a085', '#2ecc71', '#27ae60', '#3498db', '#2980b9', '#9b59b6', '#8e44ad', '#34495e', '#2c3e50', '#f1c40f', '#f39c12', '#e67e22', '#d35400', '#e74c3c', '#c0392b', '#ecf0f1', '#bdc3c7', '#95a5a6', '#7f8c8d'];
var flatUIHexColors = [ 0x1abc9c, 0x16a085, 0x2ecc71, 0x27ae60, 0x3498db, 0x2980b9, 0x9b59b6, 0x8e44ad, 0x34495e, 0x2c3e50, 0xf1c40f, 0xf39c12, 0xe67e22, 0xd35400, 0xe74c3c, 0xc0392b, 0xecf0f1, 0xbdc3c7, 0x95a5a6, 0x7f8c8d];
@thejmazz
thejmazz / symlinkifyprompt.py
Last active August 29, 2015 14:19
Small python script to replace full path in prompt with symlinks where appropriate.
# Small python script to replace full path in prompt with symlinks where
# appropiate. Set your shell prompt to this script's output with
######################################################################
# export PROMPT_COMMAND='PS1="$(python /path-to/symlinkifypath.py)"' #
######################################################################
# in your .bashrc.
# Set 'symLinksDir' and 'tilde' as per your needs below.
# Please make sure all your symlinks are the complete path - no symlinks
# inside another.. This script works for symlinks that start from the root
@thejmazz
thejmazz / xorg.conf
Created May 12, 2015 23:10
xorg config file for more monitor resolutions (/etc/X11/xorg.conf)
Section "Monitor"
Identifier "DVI-1"
Modeline "1280x960_60.00" 101.25 1280 1360 1488 1696 960 963 967 996 -hsync +vsync
Modeline "1152x900_60.00" 85.00 1152 1216 1336 1520 900 903 913 934 -hsync +vsync
Modeline "1600x1200_60.00" 161.00 1600 1712 1880 2160 1200 1203 1207 1245 -hsync +vsync
Option "PreferredMode" "1280x960_60.00"
EndSection
@thejmazz
thejmazz / .vimrc
Last active March 1, 2016 03:53
My .vimrc
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" Vundle, the plug-in manager for Vim
Plugin 'gmarik/Vundle.vim'
" addon-mw-utils: interpret a file by function and cache file automatically
Plugin 'marcweber/vim-addon-mw-utils'
@thejmazz
thejmazz / hybridbrackets.vim
Created June 6, 2015 17:07
Modifiy hybrid colour scheme for Vim. Changed flashing background on brackets to foreground.
" File: hybrid.vim
" Maintainer: Andrew Wong (w0ng)
" URL: https://github.com/w0ng/vim-hybrid
" Modified: 27 Jan 2013 07:33 AM AEST
" License: MIT
" Description:"{{{
" ----------------------------------------------------------------------------
" The RGB colour palette is taken from Tomorrow-Night.vim:
" https://github.com/chriskempson/vim-tomorrow-theme
@thejmazz
thejmazz / install-vim.sh
Created June 8, 2015 18:27
Bash script for installing my Vim setup
#!/bin/bash
# Install Vim and git
sudo apt-get update
sudo apt-get install vim
sudo apt-get install git
# Make directories
mkdir $HOME/.vim
mkdir $HOME/.vim/bundle
mkdir $HOME/.vim/colors
@thejmazz
thejmazz / install-apt-packages.sh
Last active August 29, 2015 14:22
Bash script for installing some packages provided by aptitude
#!/bin/bash
sudo apt-get update
sudo apt-get upgrade
programs="gcc curl git xclip"
for prog in $programs; do
sudo apt-get install $prog
done
@thejmazz
thejmazz / install-python.sh
Last active July 31, 2023 21:48
Install python 2.7.9 and 3.4.3 on Ubuntu
# Dependencies for installing Python
sudo apt-get install build-essential
sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev
# Download Python 2.7.9 and extract
mkdir $HOME/Downloads
cd $HOME/Downloads
wget https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tgz
tar -xvf Python-2.7.9.tgz
@thejmazz
thejmazz / ssh-init-config.sh
Created July 2, 2015 14:27
Short script for generating ssh config file.
#!/bin/bash
sshdir="$HOME/.ssh"
# All keys should end in _rsa with their respective lock ending in _rsa.pub
keys=`ls $sshdir | grep _rsa$`
# Clean old config
rm $sshdir/config
# Build new config