Skip to content

Instantly share code, notes, and snippets.

View isGabe's full-sized avatar
👨‍💻
:party-code:

Gabriel Luethje isGabe

👨‍💻
:party-code:
View GitHub Profile
@isGabe
isGabe / Gruntfile.js
Last active December 21, 2015 13:39
basic grunt files for Compass, SASS, and concatenating and minifying JS
module.exports = function(grunt) {
grunt.initConfig({
watch: {
css: {
files: '**/*.scss',
tasks: ['compass'],
},
},
compass: { // Task
dist: { // Target
@isGabe
isGabe / wordpress-comments.scss
Created September 4, 2013 18:27
WordPress: basic comments style .scss template #wordpress #snippet
/**
* Basic WordPredd comment style template
*
* ** Check your theme's comments templates & tags. _s theme uses .comment-list for the comment container, but yours may differ.
*/
.comment-list{
list-style:none;
margin:0 0 1em;
padding:0;
@isGabe
isGabe / apply-parent-page-temmplate.php
Created September 6, 2013 18:05
WordPress - Automatically apply a page template to children of a page #WordPress #snippet
/**
* Automatically apply parent page template
*
* Inspired by: http://is.gd/wp_apply_parent_page_template
*/
function fstop_use_parent_page_template() {
// Checks if current post type is a page, rather than a post
if ( is_page() ){
$ancestors = get_post_ancestors( get_the_id() );
@isGabe
isGabe / Gruntfile.js
Last active December 28, 2015 15:09
Grunt Setup #snippet
module.exports = function(grunt) {
grunt.initConfig({
grunticon: {
myIcons: {
options: {
src: "icons-svg",
dest: "icons-exp",
datasvgcss: "icon-svg.scss",
datapngcss: "icon-png.scss",
@isGabe
isGabe / Styles-upside-the-head-with-jQuery.markdown
Created November 25, 2013 20:25
A Pen by Gabriel Luethje.

Styles upside the head with jQuery

Yes, it's dirty, but sometimes we have to do it.

For example I'm working on a 3rd party search tool that for some odd reason allows a single custom javascript file, but no other customizations outside of their UI.

A Pen by Gabriel Luethje on CodePen.

License.

@isGabe
isGabe / mdkircd.sh
Last active January 2, 2016 09:49
mkdir + cd in a single command
# Place this in your .bash_profile, reload .bash_profile
# Type 'mkdircd [new-directory-name]'
# Rejoice
# Found here: http://linux.101hacks.com/cd-command/mkdir-and-cd-together/#comment-4
# I shortened mine to 'mdcd'
function mkdircd () { mkdir -p "$@" && cd $_; }
@isGabe
isGabe / SassMeister-input-HTML.html
Last active January 7, 2019 15:48
Sass function to check contrast ratio & conditionally change text color
<button>Submit</button>
@isGabe
isGabe / gulpfile.js
Last active August 29, 2015 13:57
Gulp.js
// Include gulp & plugins
var gulp = require('gulp'),
jshint = require('gulp-jshint'),
sass = require('gulp-sass'),
autoprefixer = require('gulp-autoprefixer'),
concat = require('gulp-concat'),
uglify = require('gulp-uglify'),
imagemin = require('gulp-imagemin'),
svgmin = require('gulp-svgmin'),
rename = require('gulp-rename'),
@isGabe
isGabe / SassMeister-input-HTML.html
Created March 13, 2014 19:34
Generated by SassMeister.com.
<header>header</header>
<nav>navigation</nav>
<article>article</article>
<footer>footer</footer>
@isGabe
isGabe / SassMeister-input.scss
Created March 14, 2014 22:58
Generated by SassMeister.com.
// ----
// Sass (v3.3.2)
// Compass (v1.0.0.alpha.18)
// ----
.thing {
border: {
color: #ccc;
width: 1px;
style: solid;