Skip to content

Instantly share code, notes, and snippets.

View juanjoseijas's full-sized avatar
💭
I may be slow to respond.

Juanjo Seijas juanjoseijas

💭
I may be slow to respond.
View GitHub Profile
@juanjoseijas
juanjoseijas / .bash_profile
Created December 9, 2012 18:09
Bash profile showing Ruby version and git branch
export PS1='\e[0:35m⌘\e[m \e[0;33m $(ruby -e "print RUBY_VERSION")\e[m \e[0:36m\w/\e[m \e[0:33m`git branch 2> /dev/null | grep -e ^* | sed -E s/^\\\\\*\ \(.+\)$/\(\\\\\1\)\ /`\e[m'
@juanjoseijas
juanjoseijas / site.yml
Created April 3, 2013 13:21
Sitemap for Middleman
url: http://www.example.com
@juanjoseijas
juanjoseijas / markdown-yaml
Created November 12, 2013 23:17
helper to process yaml as markdown
def markdown(text)
Tilt['markdown'].new { text }.render(scope=self)
end
@juanjoseijas
juanjoseijas / backup.sh
Last active January 2, 2016 14:48
Backup (mysql dump) all your MySQL databases in separate files
#! /bin/bash
TIMESTAMP=$(date +"%F")
BACKUP_DIR="/backup/$TIMESTAMP"
MYSQL_USER="backup"
MYSQL=/usr/bin/mysql
MYSQL_PASSWORD="password"
MYSQLDUMP=/usr/bin/mysqldump
mkdir -p "$BACKUP_DIR/mysql"
@juanjoseijas
juanjoseijas / gist:707b1cfb0b8dd8d45e5d
Created November 19, 2014 19:29
Using HTTParty To Fetch Facebook
require 'rubygems'
require 'httparty'
## define class
class Facebook
## load and inherit HTTParty class
include HTTParty
## set the default base URI
base_uri 'https://graph.facebook.com'
## set the format to JSON, so that HTTParty will automatically decode it
.location .blip {
position: relative;
display: inline-block;
height: 30px;
width: 30px;
left: -10px;
}
.location .blip .blip-base {
position: absolute;
height: 10px;
@juanjoseijas
juanjoseijas / middlemanAnvilConfiguration
Last active September 18, 2015 19:37 — forked from RyanParsley/middlemanAnvilConfiguration
Create a new Middleman project and make it work with Anvil.
middleman init my_new_project --rack
rvm --create --ruby-version use 1.9.3
rvm env . -- --env > .powenv
@juanjoseijas
juanjoseijas / spacing.scss
Created November 16, 2017 12:16
Bulma spacing
$sizeUnit: rem;
$marginKey: 'has-margin';
$paddingKey: 'has-padding';
$separator: '-';
$sizes: (
('none', 0),
('xxs', 0.125),
('xs', 0.25),
('sm', 0.5),
('md', 1),
@juanjoseijas
juanjoseijas / gist:65d3e572ae9c744f840a2505eb1b0f00
Created November 17, 2017 14:40
Library not loaded: /usr/local/opt/readline/lib/libreadline.6.dylib (LoadError)
ln -s /usr/local/opt/readline/lib/libreadline.7.0.dylib /usr/local/opt/readline/lib/libreadline.6.dylib
@juanjoseijas
juanjoseijas / grid.scss
Last active January 10, 2018 15:42
Grid with Susy3 + Flexbox
@import "susy/sass/susy";
@import 'susy/sass/plugins/svg-grid/';
$susy: (
'columns': susy-repeat(6),
'gutters': 2em,
'svg-grid-colors': hsla(180, 50%, 50%, 0.25),
);