Skip to content

Instantly share code, notes, and snippets.

View nacho87's full-sized avatar

Jose Ignacio Decima nacho87

View GitHub Profile
@nacho87
nacho87 / .bashrc
Created September 19, 2019 00:05
Add color to git
# Configure colors, if available.
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
c_reset='\[\e[0m\]'
c_user='\[\e[0;32m\]'
c_path='\[\e[1;34m\]'
c_git_clean='\[\e[0;37m\]'
c_git_staged='\[\e[0;32m\]'
c_git_unstaged='\[\e[0;31m\]'
else
c_reset=
@nacho87
nacho87 / vscode.js
Created September 16, 2019 13:52
Vscode config
test
@nacho87
nacho87 / survey-form.css
Last active December 9, 2015 20:13
survey.css
/** @license MyFonts Webfont Build ID 2936020, 2014-12-08T23:22:53-0500 The fonts listed in this notice are subject to the End User License Agreement(s) entered into by the website owner. All other parties are explicitly restricted from using the Licensed Webfonts(s). You may obtain a valid license at the URLs below. Webfont: BrandonGrotesque-ThinItalic by HVD Fonts URL: http://www.myfonts.com/fonts/hvdfonts/brandon-grotesque/thin-italic/ Webfont: BrandonGrotesque-Thin by HVD Fonts URL: http://www.myfonts.com/fonts/hvdfonts/brandon-grotesque/thin/ Webfont: BrandonGrotesque-RegularItalic by HVD Fonts URL: http://www.myfonts.com/fonts/hvdfonts/brandon-grotesque/italic/ Webfont: BrandonGrotesque-MediumItalic by HVD Fonts URL: http://www.myfonts.com/fonts/hvdfonts/brandon-grotesque/medium-italic/ Webfont: BrandonGrotesque-Medium by HVD Fonts URL: http://www.myfonts.com/fonts/hvdfonts/brandon-grotesque/medium/ Webfont: BrandonGrotesque-Regular by HVD Fonts URL: http://www.myfonts.com/fonts/hvdfonts/brandon
@nacho87
nacho87 / gh-pages-deploy.md
Last active November 22, 2015 20:44 — forked from cobyism/gh-pages-deploy.md
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@nacho87
nacho87 / inline-validation.js
Last active September 16, 2015 16:30 — forked from guyroutledge/inline-validation.js
Inline form validation with Gravity Forms
// if an invalid form field has been made valid,
// remove the shouty error highlighting - if a valid
// required field has been made invalid, start shouting
$('input, textarea, select').on('change', function(){
var $input = $(this);
var isRequired = $input.parents('.gfield').is('.gfield_contains_required');
var isValid = $input.is(':valid');
if ( isRequired && isValid ) {
@nacho87
nacho87 / font.scss
Last active September 10, 2015 04:10
Rem/PX calculator
@function calculateRem($size) {
$remSize: $size / 16px;
@return #{$remSize}rem;
}
@mixin fontSize($size) {
$unit: str-slice(#{$size}, -2);
$px: $size;
$rem: '';
// Convert Pixels
#############################################
# Push de la rama actual
git push origin $rama_actual
#############################################
# Volver a un commit anterior, descartando los cambios
git reset --HARD $SHA1
#############################################
# Ver y descargar Ramas remotas
@nacho87
nacho87 / Mixin rem
Created April 6, 2015 13:51
Calculate Rem
/* =Typographical Mixins/Functions
-------------------------------------------------------------- */
@function calculateRem($size) {
$remSize: $size / 16px;
@return #{$remSize}rem;
}
@mixin fontSize($size) {
font-size: $size; //Fallback in px
# Path to your oh-my-zsh installation.
export ZSH=/Users/macbook/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="nico"
# Uncomment the following line to use case-sensitive completion.
@nacho87
nacho87 / gist:02a4a40b319c772f3b4d
Created March 9, 2015 16:46
Git Cheats for Commits
24hours
git log --since=midnight --author="`git config user.name`" --oneline
All Commits
git log --abbrev-commit --author="`git config user.name`" --pretty=oneline