Skip to content

Instantly share code, notes, and snippets.

View teledirigido's full-sized avatar

Miguel Garrido teledirigido

View GitHub Profile
@teledirigido
teledirigido / og.php
Last active November 15, 2017 14:59
Set OG on wordpress
<?php
/*
* Add this in your functions.php:
add_action('wp_head', function(){
open_graph::general();
open_graph::facebook();
open_graph::twitter();
});
@teledirigido
teledirigido / .bash_profile
Last active August 29, 2015 14:21
Useful alias for your bash_profile
# Open your bashprofile
alias openbash="subl ~/.bash_profile";
# Thanks to jamie@blacksheepdesign.co.nz
alias showFiles="defaults write com.apple.finder AppleShowAllFiles YES; killall Finder /System/Library/CoreServices/Finder.app";
alias hideFiles="defaults write com.apple.finder AppleShowAllFiles NO; killall Finder /System/Library/CoreServices/Finder.app";
@teledirigido
teledirigido / commands.sh
Last active August 29, 2015 14:21
Useful commands on shell
# Find .htaccess and do chmod
sudo find / -type f -name '.htaccess' -exec chmod 604 {} \;
# Find wp-config.php and do chmod
sudo find / -type f -name 'wp-config.php' -exec chmod 644 {} \;
@teledirigido
teledirigido / animation.js
Created May 25, 2015 04:11
Animate element with jQuery
/*
# Usage for your Javascript
$(document).ready(function(){
var animate_squared = new animation({
obj: '#your-tag .item',
});
@teledirigido
teledirigido / post_type_register.php
Last active January 15, 2017 00:13
Post type register
<?php
/**
* PARAMETERS
* ----------
*
*
* Required (Array)
*
@teledirigido
teledirigido / import_files.php
Created July 6, 2015 01:44
Create post, add attachment and update field via ACF
<?php
/*
*
* This small scripts creates a post and attaches a file using Advanced custom field.
*
* Created by Miguel Garrido
* miguel.co.nz | miguel@blacksheepdesign.co.nz
*
* Notes:
@teledirigido
teledirigido / cs_select.scss
Created July 7, 2015 05:14
CS Select (SCSS)
/*
*
* NOTE: There're some css3 features using @include and I'm not including (dumb I know).
* You can find all the css3 properties in here:
* https://gist.github.com/teledirigido/e7d346cc05b4d95b8c97
*
* This file has been created to work with the following script:
* https://gist.github.com/teledirigido/fec00d9e9ae3ac46b79c (cs_select.js)
*
*
@teledirigido
teledirigido / animate_svg.js
Last active August 29, 2015 14:24
Animate SVG with javascript
/*
USAGE:
var svg = new animate_svg({
id: '#svg-logo',
frames: 100
});
svg.init();
@teledirigido
teledirigido / fontloader.js
Last active September 17, 2015 03:11
Font loader
/*
Webfontloader
-------------
Based on: https://github.com/typekit/webfontloader#typekit
DESCRIPTION
-----------
@teledirigido
teledirigido / gruntfile.js
Last active March 23, 2016 23:02
Grunt file configuration example
/*
GRUNTFILE JS WORKING EXAMPLE
----------------------------
- Babel
- Uglify
- Browser Sync
- Sass
- Watch