Skip to content

Instantly share code, notes, and snippets.

View colormono's full-sized avatar
🤓
I’m learning as I go

Mariano Rivas colormono

🤓
I’m learning as I go
View GitHub Profile
@colormono
colormono / ipython3_mavericks.sh
Created January 17, 2018 16:52 — forked from rossov/ipython3_mavericks.sh
Install ipython3 on Mac OS X Mavericks
# Install ipython3 on Mac OS X Maverics
# Update brew
brew update
brew upgrade
# Install Python 3
brew install python3
# Install ipython
@colormono
colormono / sublime_setup.md
Last active January 26, 2017 06:20 — forked from barnes7td/sublime_setup.md
Sublime Terminal Setup

Setup Terminal for Sublime Shorcut "subl":

Open terminal and type:

1. Create a directory at ~/bin:

mkdir ~/bin

2. Copy sublime executable to your ~/bin directory:

echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://npmjs.org/install.sh | sh
add_filter('post_thumbnail_html', 'slug_responsive_img', 5, 5);
//Image sizes for Interchange
add_image_size( 'fd-lrg', 1024, 99999);
add_image_size( 'fd-med', 768, 99999);
add_image_size( 'fd-sm', 320, 9999);
function slug_responsive_img($html, $post_id, $post_thumbnail_id, $size, $attr) {
//make image links
$attachment_id = $post_thumbnail_id;
$default = wp_get_attachment_image_src($attachment_id);
@colormono
colormono / jade.md
Last active December 19, 2015 22:49

Using Yeoman and Jade

Getting started

  • Make sure you have yo installed: npm install -g yo
  • Run: yo webapp
  • Install grunt-contrib-jade: npm install grunt-contrib-jade --save-dev

Customization

@colormono
colormono / countdown.js
Last active December 19, 2015 02:38 — forked from Atinux/countdown.js
var countDown = function (endDate, el) {
el = el || $('body');
var leadingZero = function (nb) {
return (nb < 10) ? "0" + nb : + nb;
};
var updateTimer = function (seconds) {
var days = Math.floor(seconds / 86400);
seconds -= days * 86400;
var hours = Math.floor(seconds / 3600);
seconds -= hours * (3600);