Skip to content

Instantly share code, notes, and snippets.

View mavinger's full-sized avatar
🦊

Matt Avinger mavinger

🦊
View GitHub Profile

Keybase proof

I hereby claim:

  • I am mavinger on github.
  • I am maaving (https://keybase.io/maaving) on keybase.
  • I have a public key whose fingerprint is DD92 6B60 96EF 61E1 2383 03C7 1DB8 1018 A864 1E39

To claim this, I am signing this object:

@mavinger
mavinger / .htaccess
Last active August 29, 2015 14:21 — forked from ScottPhillips/.htaccess
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@mavinger
mavinger / .mongorc.js
Last active August 29, 2015 14:15 — forked from yanatan16/.mongorc.js
(function () {
rcversion = '1.0';
load('underscore.min.js')
// NOTES
// Basics, wrap the whole thing in a function
// Set a version for sanity's sake
// Load underscore, a must in any javascript environment
@mavinger
mavinger / .bash_profile
Created February 19, 2015 12:26
.bash_profile for mysysgit that includes various aliases, color variables and git prompt status
#!/bin/bash
################################################################################
# DEFINE COLORS
################################################################################
export LS_OPTS='--color=auto'
export COLOR_NC='\e[0m' # No Color
export COLOR_WHITE='\e[1;37m'
export COLOR_BLACK='\e[0;30m'
@mavinger
mavinger / post-receive
Last active August 29, 2015 14:15
Git Hook that installs npm and bower dependencies when pushed to server. The npm --production flag makes sure that devDependencies are not included. Place in: /var/repos/server.com.git/hooks/ folder and chmod +x post-receive to make it executable.
#!/bin/sh
export GIT_WORK_TREE="/var/www/server.com/"
export GIT_DIR="/var/repos/server.com.git"
echo "--> Checking out..."
git --work-tree=$GIT_WORK_TREE --git-dir=$GIT_DIR checkout -f
echo "--> Installing libraries..."
cd "$GIT_WORK_TREE"
@mavinger
mavinger / mongod.cfg
Created January 26, 2015 06:16
MongoDB Dev YAML Config File
systemLog:
destination: file
path: "C:\\tools\\mongodb\\log\\mongo.log"
logAppend: true
storage:
dbPath: "C:\\tools\\mongodb\\data\\db"
smallFiles: true
preallocDataFiles: false
journal:
enabled: true
@mavinger
mavinger / mongodb-install.ps1
Last active August 29, 2015 14:14 — forked from serdarb/Download and Install MongoDB as Windows Service PowerShell Script
Download and Install MongoDB as Windows Service PowerShell Script
# Borrowed from: http://blogs.msdn.com/b/jasonn/archive/2013/06/11/8594493.aspx
function downloadFile($url, $targetFile) {
$uri = New-Object "System.Uri" "$url"
$request = [System.Net.HttpWebRequest]::Create($uri)
$request.set_Timeout(15000) #15 second timeout
$response = $request.GetResponse()
$totalLength = [System.Math]::Floor($response.get_ContentLength()/1024)
$responseStream = $response.GetResponseStream()
$targetStream = New-Object -TypeName System.IO.FileStream -ArgumentList $targetFile, Create

Keybase proof

I hereby claim:

  • I am venetianthief on github.
  • I am maaving (https://keybase.io/maaving) on keybase.
  • I have a public key whose fingerprint is DD92 6B60 96EF 61E1 2383 03C7 1DB8 1018 A864 1E39

To claim this, I am signing this object:

[
{name: 'Afghanistan', code: 'AF'},
{name: 'Åland Islands', code: 'AX'},
{name: 'Albania', code: 'AL'},
{name: 'Algeria', code: 'DZ'},
{name: 'American Samoa', code: 'AS'},
{name: 'AndorrA', code: 'AD'},
{name: 'Angola', code: 'AO'},
{name: 'Anguilla', code: 'AI'},
{name: 'Antarctica', code: 'AQ'},