Skip to content

Instantly share code, notes, and snippets.

View ericbaranowski's full-sized avatar

Eric Baranowski ericbaranowski

View GitHub Profile
@ericbaranowski
ericbaranowski / installOpenVbx.sh
Last active December 30, 2015 03:07 — forked from dwelch2344/installOpenVbx.sh
A simple install script to setup OpenVbx on an Ubuntu 14.04 box
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
exit 1
fi
export DBNAME=openvbx
export DBUSER=openvbx
export DBPASS=openvbxPass
#!/bin/bash
# $1 : OpenVPN Config File
# $2 : Astaro .apc to create
# $3 : username
# $4 : password
if [ $# -lt 2 ] || [ $# -gt 4 ]
then
echo
echo Usage:
<?php
date_default_timezone_set("UTC");
$handle = new PDO("sqlite::memory:");
$handle->setAttribute(
PDO::ATTR_ERRMODE,
PDO::ERRMODE_EXCEPTION
);
@ericbaranowski
ericbaranowski / gistodo.md
Last active April 7, 2017 16:47
Search Directory Recursively
  • import os import fnmatch

def locate_files(search_directory): files = [] for root, dirnames, filenames in os.walk(search_directory): for image in fnmatch.filter(filenames, '*.sh'): images.append(os.path.join(root, image)) return images

@ericbaranowski
ericbaranowski / file_search.py
Created April 7, 2017 16:59
# Search Directory Recursively
import os
import fnmatch
def locate_files(search_directory):
files = []
for root, dirnames, filenames in os.walk(search_directory):
for file in fnmatch.filter(filenames, '*.sh'):
files.append(os.path.join(root, file))
return files
@ericbaranowski
ericbaranowski / python.md
Created April 8, 2017 08:10
# Single line comments start with a number symbol.

""" Multiline strings can be written using three "s, and are often used as comments """

####################################################

1. Primitive Datatypes and Operators

####################################################

You have numbers

Keybase proof

I hereby claim:

  • I am ericbaranowski on github.
  • I am ericslife (https://keybase.io/ericslife) on keybase.
  • I have a public key ASDPyhVJt4NzVzECKs9TGgu_4UPg99aCrrL_tfaqi3d21go

To claim this, I am signing this object:

@ericbaranowski
ericbaranowski / regex_i_p.txt
Created April 27, 2017 11:25
# Regex Any IP Range
^([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))\.([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))\.([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))\.([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))-([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))\.([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))\.([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))\.([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))$
/*
Fade content bs-carousel with hero headers
Code snippet by maridlcrmn (Follow me on Twitter @maridlcrmn) for Bootsnipp.com
Image credits: unsplash.com
*/
/********************************/
/* Fade Bs-carousel */
/********************************/
.fade-carousel {
@ericbaranowski
ericbaranowski / init
Created June 5, 2017 05:50
Init dotFiles
git init --bare $HOME/.cfg
alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
config config --local status.showUntrackedFiles no
echo "alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'" >> $HOME/.bashrc