Skip to content

Instantly share code, notes, and snippets.

@Drixled
Drixled / jump.fish
Last active August 29, 2015 14:23 — forked from britishtea/jump.fish
Bookmarking directories in the fish shell. Copy the file to $fish_function_path (~/.config/fish/functions by default) as jump.fish to install.
function jump -d "Jumps to a marked directory"
# If $JUMP_PATH isn't set, use a default (~/.config/jump).
if set -q $JUMP_PATH
set JUMP_PATH $HOME/.config/jump
end
# If the $JUMP_PATH directory doesn't exist, create it.
if not test -d $JUMP_PATH
mkdir -p $JUMP_PATH
end
@Drixled
Drixled / header.php
Created June 29, 2015 04:14
Sage header with navwalker
<?php
// This file assumes that you have included the nav walker from https://github.com/twittem/wp-bootstrap-navwalker
// somewhere in your theme.
?>
<header class="banner navbar navbar-default navbar-static-top" role="banner">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only"><?= __('Toggle navigation', 'sage'); ?></span>
@Drixled
Drixled / 0_reuse_code.js
Created February 23, 2016 04:46
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
<?php
// the query
$the_query = new WP_Query( $args ); ?>
<?php if ( $the_query->have_posts() ) : ?>
<!-- pagination here -->
<!-- the loop -->
<?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
@Drixled
Drixled / type.css
Created May 1, 2016 02:12
Good vertical rythym typography
body {
font-family: Helvetica, Arial, sans-serif;
font-weight: 400;
font-style: normal;
font-size: 1.125rem;
line-height: 1.6875rem;
max-width: 760px;
padding: 1.6875rem;
margin: 0 auto;
}
<?php
$args = array (
'post_type' => 'post-type',
'posts_per_page' => -1
);
$query = new WP_Query( $args );
?>
<?php while( $query->have_posts() ): $query->the_post(); ?>
[content]
.h1 { font-size: 2rem }
.h2 { font-size: 1.5rem }
.h3 { font-size: 1.25rem }
.h4 { font-size: 1rem }
.h5 { font-size: .875rem }
.h6 { font-size: .75rem }
.sans-serif { font-family: "museo-sans", sans-serif; }
.font-desyrel { font-family: 'Desyrel';}
.font-family-inherit { font-family: inherit }
@Drixled
Drixled / setCenter-markup.php
Last active October 25, 2017 16:42
ACF Google Maps - SetCenter.js
<!--
1. Seguir la siguiente documentacion: https://www.advancedcustomfields.com/resources/google-map/
2. El siguiente markup generara una lista de botones con el nombre de cada ubicación subida via
custom fields, cada boton obtiene la clase de 'setCenter' y hereda como atributos HTML5 la
latitud y longitud de la ubicacion seleccionada.
-->
var $grid = $('.grid').isotope({
itemSelector: '.grid-item',
masonry: {
horizontalOrder: true,
}
});
$grid.imagesLoaded().progress(function() {
$grid.isotope('layout');
});
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>stringify</title>
<meta name="description" content="">