Skip to content

Instantly share code, notes, and snippets.

View j0lvera's full-sized avatar
🎯
Focusing

Juan Olvera j0lvera

🎯
Focusing
View GitHub Profile
@j0lvera
j0lvera / SassMeister-input-HTML.html
Last active August 29, 2015 14:13
Generated by SassMeister.com.
<div class="container">
<div class="foo">Hi</div>
<div class="bar">Hi</div>
</div>
@j0lvera
j0lvera / .zshrc
Last active August 29, 2015 14:12 — forked from SlexAxton/.zshrc
gifify() {
if [[ -n "$1" ]]; then
if [[ $2 == '--good' ]]; then
ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png
time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif
rm out-static*.png
else
ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif
fi
else
@j0lvera
j0lvera / example.php
Created December 8, 2014 22:38
How to print categories in a post, WordPress
<?php
$categories = get_the_category( $post-> ID );
$category = $categories[0]->cat_name;
// How to use it
$args = array(
'post_type' => 'post-type-name',
'category_name' => $category
);
@j0lvera
j0lvera / module.py
Created December 8, 2014 06:06
Python module structure
"""module docstring"""
# imports
# constants
# exception classes
# interface functions
# classes
# internal functions & classes
def main(...):
@j0lvera
j0lvera / SassMeister-input.scss
Created December 1, 2014 20:59
Generated by SassMeister.com.
// ----
// Sass (v3.3.14)
// Compass (v1.0.1)
// ----
// typography.scss
$indent: false !default;
// mixins
@j0lvera
j0lvera / type.scss
Last active August 29, 2015 14:08
Type
/*
* Typography
*
* Headings, body text, lists, and other misc typographic elements.
*/
// Defaults
$base-margin-bottom: 1rem;
$base-line-height: 1.618;
$headings-line-height: 1.125;
@j0lvera
j0lvera / hyx.scss
Last active August 29, 2015 14:08
hyx.scss
/*! Hyx v1.0.2 | MIT License | http://github.com/thinkxl/hyx.less */
// Global settings
$gutter: 4% !default; // - distance between columns
$grid-size: 12 !default; // - num of columns
$width: 100% !default; // - space that we want to use for the grid
// Mixin that does all the math about % for columns
//
// @param $num {int} number of columns
/**
* LocalStore is a *super* simple abstraction around localStorage for easy
* get/set/delete. We may end up wanting something more powerful like
* BankersBox, but for now this is much lighter weight.
*
* If you ever need to completely wipe LocalStore for *all* users when,
* say, changing the format of data being cached, just bump up the "version"
* property below.
*/
window.LocalStore = {
#!/bin/bash
version=1.0.1
versionDate="2014-02-14"
function showHelp() {
echo "watchfile - monitor file(s)/command and perform action when changed
Possible ways of usage
----------------------------------------
@j0lvera
j0lvera / SassMeister-input.scss
Created September 11, 2014 22:07
Generated by SassMeister.com.
// ----
// Sass (v3.3.14)
// Compass (v1.0.1)
// ----
/*! Hyx.less v2.1.0 | MIT License | http://github.com/thinkxl/hyx.less */
// Settings
$gutter: 4%; // - distance between columns
$grid-size: 12; // - num of columns