Skip to content

Instantly share code, notes, and snippets.

View beenhere4hours's full-sized avatar

Daniel Masi beenhere4hours

View GitHub Profile
@beenhere4hours
beenhere4hours / .vimrc
Created December 16, 2014 22:28
vim initialization commands
set background=dark
syntax on
set ruler " show the line number on the bar
set more " use more prompt
set autoread " watch for file changes
set number " line numbers
set hidden
set noautowrite " don't automagically write on :next
set lazyredraw " don't redraw when don't have to
set showmode
@beenhere4hours
beenhere4hours / .gitconfig
Last active August 12, 2021 14:37
Custom git configuration
[user]
name = Daniel Masi
email = beenhere4hours@gmail.com
[alias]
# lists the available aliases
ad = add
al = config --get-regexp alias
st = status
ci = commit
@beenhere4hours
beenhere4hours / .bash_profile
Last active October 23, 2019 15:24
SGP - Mac OSX 10.9.5 - work machine bash profile for reference
# ---------------------------------------------------------- alias
# list long
alias ll='ls -lah'
# go to code dir
alias code='cd ~/code'
# clear screen
alias cl='clear'
@beenhere4hours
beenhere4hours / .bash_login
Last active August 29, 2015 14:12
VPS - Centos 6x32 - command to perform at login
# Bash_login file
# commands to perform from the bash shell at login time
# (sourced from .bash_profile)
echo
w
#cal `date +"%m"` `date +"%Y"`
@beenhere4hours
beenhere4hours / .bash_logout
Created January 5, 2015 14:38
VPS - Centos 6x32 - commands to perform on logout
# ~/.bash_logout
clear
@beenhere4hours
beenhere4hours / android-pull-db.sh
Last active July 27, 2017 18:12
SGP - shell script to make pulling all data from apps easier
#!/bin/bash
INSPI="com.safeguardproperties.inspi"
PD="com.safeguardproperties.photodirect"
function deletePreviousData () {
echo
if [ -f ~/Downloads/data.ab ]; then
echo removing previous data file
rm -r ~/Downloads/data.ab
@beenhere4hours
beenhere4hours / .gitignore_global
Last active August 29, 2015 14:15
Git - global git ignore
.DS_Store
nbproject
@beenhere4hours
beenhere4hours / Encryption.java
Last active May 20, 2018 18:40
Java - AES-256 password based key encryption
/*
Both of the sites below give information on how to implement encryption and best practices
http://nelenkov.blogspot.com/2012/04/using-password-based-encryption-on.html
http://karanbalkar.com/2014/02/tutorial-76-implement-aes-256-encryptiondecryption-using-java/
*/
package com.masi.encryption;
import java.security.AlgorithmParameters;
import java.security.SecureRandom;
@beenhere4hours
beenhere4hours / vps1.txt
Last active August 29, 2015 14:18
VPS Setup 1 - SSH and Access
# login - gain access to the box
ssh root@dmasi.us
# open 2 connections as we will need access if the changes below fail
# set up user
# set some vars
MYUSERNAME="dmasi"
MYUSERKEY="<pub key>"
useradd $MYUSERNAME
@beenhere4hours
beenhere4hours / vps2.txt
Last active August 29, 2015 14:18
VPS Setup 2 - LAMP Stack
## Install EPEL
wget http://dl.fedoraproject.org/pub/epel/beta/7/x86_64/epel-release-7-1.noarch.rpm
rpm -Uvh yum install epel-release-7-1.noarch.rpm
## Install iptables-services
yum install iptables-services
## Configure the IP Tables
systemctl mask firewalld
systemctl enable iptables