Skip to content

Instantly share code, notes, and snippets.

View nickbreslin's full-sized avatar

Nick Breslin nickbreslin

View GitHub Profile
/* Stratum 2 Web Bold */
@font-face {
font-family: 'Stratum2WebBold';
src: url('fonts/Stratum2Web/Stratum2WebBold.eot');
src: url('fonts/Stratum2Web/Stratum2WebBold.eot?#iefix') format('embedded-opentype'),
url('fonts/Stratum2Web/Stratum2WebBold.woff2') format('woff2'),
url('fonts/Stratum2Web/Stratum2WebBold.woff') format('woff');
font-weight: 700;
font-style: normal;
}
@nickbreslin
nickbreslin / composer.json
Created September 7, 2016 19:51
Wordpress Plugin Composer
{
"name": "<user/org>/<repo name>",
"type": "wordpress-plugin",
"license": "",
"description": "",
"homepage": "https://github.com/<user/org>/<repo name>",
"authors": [
{
"name": "Nick Breslin",
"email": "nickbreslin@gmail.com",
@nickbreslin
nickbreslin / tintin_install.sh
Created December 1, 2015 04:14
Ubuntu Tintin++ Install
mkdir tintin
cd tintin
sudo apt-get install build-essential
sudo apt-get build-dep tintin++
wget http://downloads.sourceforge.net/tintin/tintin-2.01.1.tar.gz
tar -zxvf tintin-2.01.1.tar.gz
cd /tt/src
./configure
sudo make install
@nickbreslin
nickbreslin / ghpages.sh
Created November 27, 2015 23:06
GitHub Pages auto-publish from Master
# Generate Docs on master branch
# Switch to github pages, copy over new documentation
# Publish, then switch back to master
vendor/bin/phpdoc -d src/ -t docs_new
git checkout gh-pages
rm -rf docs/
cp -r docs_new docs
git add docs/
git commit -m 'Documentation Sync'
@nickbreslin
nickbreslin / lampbootstrap
Created July 2, 2015 20:32
Lamp Bootstrap
#*****************************************************************
# Updating
#*****************************************************************
apt-get update -yqq
apt-get install python-pip -yqq;
pip install awscli;
debconf-set-selections <<< "postfix postfix/main_mailer_type string 'Internet Site'"
@nickbreslin
nickbreslin / bash.commands
Last active August 29, 2015 14:18
UNIX/Bash Shortcuts, Commands, etc.
usermod -a -G ftp tony
#add existing user to existing group. Adds as non-primary.
sudo chown -R www-data /%path%/
sudo chgrp -R www-data /%path%/
sudo chmod -R g+w /%path%/
$states = array(
"al" => "alabama"
,"ak" => "alaska"
,"az" => "arizona"
,"ar" => "arkansas"
,"ca" => "california"
,"co" => "colorado"
,"ct" => "connecticut"
,"de" => "delaware"
,"fl" => "florida"
$expiry = 86400; // expiry is in seconds.
if ($results = apc_fetch($key)) {
} else {
$results = someFunction();
apc_add($key, $results, $expiry);
}
//$results will either be fetched from cache, or generated and stored.
@nickbreslin
nickbreslin / Zone
Last active December 17, 2015 20:19
Parts Collection
using UnityEngine;
using System.Collections;
public class Zone : MonoBehaviour {
void OnTriggerEnter(Collider c) {
if(transform.tag == "Part") {
Destroy(gameObject);
@nickbreslin
nickbreslin / CSVReader.cs
Created May 15, 2013 00:24
Unity C# CSV
using UnityEngine;
using System.Collections;
public class CSVReader : MonoBehaviour {
public TextAsset file;
public GameObject[] hexagons;
void Awake() {