Skip to content

Instantly share code, notes, and snippets.

View ryanve's full-sized avatar
🟣
🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣

ryan neptune ryanve

🟣
🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣
View GitHub Profile
@ryanve
ryanve / .bash_profile
Created May 19, 2015 17:38
.bash_profile mac aliases
alias gitr='git'
alias gti='git'
alias got='git'
alias gut='git'
alias gi='git'
alias g='git'
alias gurnt='grunt'
alias gr='grunt'
<!DOCTYPE html>
<title>.slideshow demo</title>
<style>
html { font: normal 1em/1.6 sans-serif; background: pink; }
body { margin: 0; }
</style>
<style>
.slideshow {
text-align: center;
margin: 0;
@ryanve
ryanve / is-sibling-grid.scss
Last active March 6, 2017 02:19
Bourbon Neat mixin for Lea Verou's styling columns by sibling count technique
.is-sibling-grid {
margin-left: auto;
margin-right: auto;
padding-left: 0;
padding-right: 0;
}
.is-sibling-grid > :only-child {
display: block;
width: 100%;
@ryanve
ryanve / browse.scss
Last active October 28, 2015 00:32
CSS module for semantic inline [type=file] inputs
.browse {
display: inline;
font-size: inherit;
}
.browse__input {
display: inline-block;
position: absolute;
@include px-rem(padding, .1);
@include px-rem(margin, 0, -.5);
@ryanve
ryanve / _sort.scss
Last active March 11, 2016 01:24
css for sortable table columns like mac finder
$sort-triangle-size: .6em;
.sort__cell {
padding: 0;
}
.sort__trigger {
display: block;
width: 100%;
text-align: left;
@ryanve
ryanve / is-grid-xn.scss
Created November 23, 2015 19:40
css layout utility for multicolumn lists
[class*="is-grid-x"] {
@include clearfix;
margin-left: auto;
margin-right: auto;
padding-left: 0;
padding-right: 0;
}
[class*="is-grid-x"] > * {
@include px-rem(margin-bottom, $base-spacing-unit);
@ryanve
ryanve / in_category.php
Last active December 8, 2016 07:08
wordpress check if in category or parent category
<?php
$in_category = function($cats) {
if (in_category($cats)) return true;
foreach ((array) $cats as $cat) {
$subs = get_term_children((int) $cat, 'category');
if ($subs && in_category($subs)) return true;
}
return false;
};
@ryanve
ryanve / is_page.php
Created December 27, 2015 23:40
wordpress check if is page or subpage of that page
<?php
$is_page = function($pages) {
global $post;
if (!is_page()) return false;
if (is_page($pages)) return true;
if (empty($post->post_parent)) return false;
$parent = get_post($post->post_parent);
if (!$parent || empty($parent->post_name)) return false;
$slug = $parent->post_name;
@ryanve
ryanve / grids.scss
Last active January 24, 2017 20:42
bourbon neat grid utility classes
.is-clearfix {
@include clearfix;
}
.is-clear {
clear: both;
}
.is-container {
@include outer-container;
@ryanve
ryanve / GruntFile.js
Last active March 26, 2016 01:21
grunt npm jshint demo
module.exports = function(grunt) {
var _ = grunt.util._;
var pkg = grunt.file.readJSON('package.json');
grunt.initConfig({
pkg: pkg,
jshint: {
all: ['./'], // deep
dir: ['*.js'], // shallow
sub: ['*/'], // sub dirs