Skip to content

Instantly share code, notes, and snippets.

View grayghostvisuals's full-sized avatar
🐢
I may be slow to respond.

GRAY GHOST grayghostvisuals

🐢
I may be slow to respond.
View GitHub Profile
@grayghostvisuals
grayghostvisuals / gist:9840994
Created March 28, 2014 19:25
Start Apache Automagically when running vagrant up
sudo vim /etc/init/httpd-start.conf
description "start httpd service after shared folder is mounted"
start on vagrant-mounted
#restart if die
respawn
#creates child processes
expect fork
@grayghostvisuals
grayghostvisuals / delay-loop.scss
Created April 16, 2014 18:54
Dustin's Delay Loop
.q-as > li {
opacity: 0;
$delay: 0ms;
@for $i from 1 through 4 {
$delay: $delay + 40;
&:nth-child(#{$i}) { @include transition-delay($delay); }
}
.visible & { opacity: 1; }
(function() {
var Person = {
init: function() {
this.form = $('#form');
this.bindEvents();
},
bindEvents: function() {
@grayghostvisuals
grayghostvisuals / classlist-detection.js
Created May 14, 2014 15:17
Detection Method for Classlist Support
if('classList' in document.createElement('p')) {
console.log('classlist supported');
} else {
console.log('classlist not supported');
}
@grayghostvisuals
grayghostvisuals / index.css
Last active August 29, 2015 14:04
SUITCSS Starter File: Remove portions where desired. A listing of every variable is provided along with it's default value.
@import "suitcss-base";
@import "suitcss-utils-align";
@import "suitcss-utils-display";
@import "suitcss-utils-layout";
@import "suitcss-utils-link";
@import "suitcss-utils-offset";
@import "suitcss-utils-position";
@import "suitcss-utils-size";
@import "suitcss-utils-text";
#! /usr/bin/python
from sys import argv
from os.path import exists
from os import makedirs
from os import symlink
from os import system
import getopt
#
CACHE MANIFEST
#
# Version Control
# v0.0.0 00-00-0000
#
# Handy Dandy Developer Tools
# CHROME chrome://appcache-internals
# FIREFOX about:cache
# Charles - Web Debugging Proxy App
# http://charlesproxy.com
@grayghostvisuals
grayghostvisuals / Super Smoothie
Created September 6, 2012 23:51
Morning Super Smoothie for everyone in the house...
1 Peach
1/2 Apple
1 Slice of fresh pineapple
6 Red grapes
2 TBSP Plain Yogurt unsweetened
1 1/2 cup of organic soy milk
1 tsp chia seeds
4 capsules Bee Pollen NSP
1 scoop Love and Peas protein powder (optional) or Syner Protein powder for Mexico clients.
1 TBSP RawPumpkin Seeds (soaked overnight)
@grayghostvisuals
grayghostvisuals / window.devicePixelRatio Detection
Created October 13, 2012 01:23
Detect hi-dpi screens using Javascript with a fallback to a matchMedia query on Firefox
// Ala Thomas Fuchs : retinafy
function retinaDevice() {
return (('devicePixelRatio' in window && devicePixelRatio > 1) ||
('matchMedia' in window && !matchMedia("(-moz-device-pixel-ratio:1.0)").matches))
}
@grayghostvisuals
grayghostvisuals / WordPress Title Filter A
Created October 17, 2012 18:41
There are many ways to skin a cat when it comes to implementing wp_title() - http://ziadrahhal.com/2012/05/recommended-wp_title-filter-in-wordpress
// http://ziadrahhal.com/2012/05/recommended-wp_title-filter-in-wordpress
// http://codex.wordpress.org/Plugin_API/Filter_Reference/wp_title
// http://codex.wordpress.org/Function_Reference/wp_title
// Title tag filter
// required for themes
// a custom callback function that displays a meaningful title
// depending on the page being rendered
function wp_flex_title_filter( $title, $sep, $sep_location ) {