Skip to content

Instantly share code, notes, and snippets.

View scottzirkel's full-sized avatar

Scott Zirkel scottzirkel

View GitHub Profile
@scottzirkel
scottzirkel / uriSegments.js
Last active August 29, 2015 14:02
Parses out the segments of the URI and returns either an array of all or the specified segment.
/**
* @param {Number} segment
*/
function uriSegments(segment){
var uri_segments = window.location.pathname.split('/');
if(segment)
return uri_segments[segment];
else
return uri_segments;
};
@scottzirkel
scottzirkel / install-wp.sh
Created June 27, 2014 20:26
Custom WordPress install script
#!/bin/bash
echo "What is the theme name? (no spaces)"
read THEME
echo Installing Wordpress
git clone git@github.com:scottzirkel/wordpress-base.git website ## This pulls down my WordPress starter template
cd website
echo Installing Composer ## I use Composer to manage the backend dependencies (ie: WordPress, public plugins, etc)
composer install
cd app/themes
echo Setting up "$THEME"
@scottzirkel
scottzirkel / Graytones-SASS-Function.markdown
Last active August 29, 2015 14:13
Graytones SASS Function

Grayscale tones SASS

Just a quick function to grab various warm, cool, & neutral graytones for my Sass files. I built it with the Pantone grays, but they could be any tones really. Better than just the basic grayscale when prototyping or even for production.

A Pen by Scott Zirkel on CodePen.

License.

@scottzirkel
scottzirkel / shipitconfig.js
Last active August 29, 2015 14:17
shipitfile
module.exports = {
projectName: 'PROJECT_NAME',
repo: 'HTTPS REPO URL',
staging: {
servers: 'USERNAME@SERVER',
deployTo: '/absolute/path/to/www/root'
}
}
@scottzirkel
scottzirkel / index.html
Created July 20, 2015 20:49
Centered HR text
<div class="container">
<p>You can divide with any text you like.</p>
<p>For instance this...</p>
<hr class="hr-text" data-content="AND">
<p>...this...</p>
<hr class="hr-text" data-content="OR">
<p>...even this!</p>
</div>
@scottzirkel
scottzirkel / .zshrc
Created May 2, 2016 01:36
Make directory then CD in
function mkcd {
if [ ! -n "$1" ]; then
echo "Enter a directory name"
elif [ -d $1 ]; then
echo "\`$1' already exists"
else
mkdir $1 && cd $1
fi
}

Keybase proof

I hereby claim:

  • I am scottzirkel on github.
  • I am scottzirkel (https://keybase.io/scottzirkel) on keybase.
  • I have a public key ASCE3nxuKwJltQWL2zyvaiNBhPkUQcLvWVXcuf16pd0iXwo

To claim this, I am signing this object:

@scottzirkel
scottzirkel / PagesController.php
Created October 5, 2016 18:52
Lumen/Laravel Pages Controller
<?php
namespace App\Http\Controllers;
class PagesController extends Controller
{
public function page($page)
{
if (file_exists('../resources/views/templates/' . $page . '.blade.php'))
{
return view('templates/' . $page);
@scottzirkel
scottzirkel / states.json
Last active March 6, 2017 17:31
States Array
{
"Alabama" : "AL",
"Alaska" : "AK",
"Arizona" : "AZ",
"Arkansas" : "AR",
"California" : "CA",
"Colorado" : "CO",
"Connecticut" : "CT",
"Delaware" : "DE",
"District of Columbia" : "DC",