Skip to content

Instantly share code, notes, and snippets.

View juque's full-sized avatar

Juan Pablo Aqueveque juque

View GitHub Profile
@rwoeber
rwoeber / Gemfile
Created December 24, 2012 09:51
Sinatra app template (shamelessly copied from http://snippets.aktagon.com/snippets/568-Sinatra-App-Template) Slim views Sass stylesheets Coffee script Asset pipeline (Sprockets) View helpers A console I18n Logging ActiveRecord+migrations Debugging with Pry Flash messages Class reloading in development mode Security features such as CSRF, Cross S…
source :rubygems
gem 'thin'
gem 'slim'
gem 'sass'
gem 'sinatra'
gem 'sprockets'
gem 'sinatra-partial'
gem 'coffee-script'
gem 'therubyracer'
# Install a sane Ruby Version Manager along with Recent Ruby
\curl -L https://get.rvm.io | bash -s stable --ruby
# Source the installed script to allow for using RVM this first time
# Future logins will automatically source RVM using your bashrc or zshrc
source ~/.rvm/scripts/rvm
# Clone Trello-Archiver
git clone https://github.com/zph/trello-archiver.git
# Move into folder
cd trello-archiver/
# Install needed Ruby Gem dependencies
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active April 11, 2026 05:03
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

<!-- Formulario y botón "agregar al carro" en plantilla product.html.
Los data-attributes son necesarios para la API Ajax del carrito (opcional) -->
<form class="add_to_cart" action="{{ add_to_cart_url }}" method="post" data-bootic-cart-add="add" data-bootic-productId="{{ product.id }}">
<!-- si hay más de 1 variante, muéstralas en una lista -->
{% if product.variants_count > 1 %}
<h4>{{ 'activerecord.models.variant' | t }}</h4>
<ul class="variants">
<!-- primero las variantes disponibles -->
{% for variant in product.available_variants %}
<li class="bootic_variant available {% cycle 'odd', 'even' %} av-variant-{{ forloop.index }}">
@ismasan
ismasan / api-products.html
Created March 1, 2013 17:28
Ejemplo: traer productos Bootic vía API y listar en HTML.
<html>
<head>
<title>Api products</title>
<style type="text/css" media="screen">
#list {
list-style-type: none;
margin: 0;
padding: 0;
}
.product {
@ismasan
ismasan / Gemfile
Last active December 16, 2015 21:58
source "https://rubygems.org"
gem 'sinatra'
group :development do
gem 'shotgun'
end
@mwcz
mwcz / gsa.js
Last active December 17, 2015 16:29
(mostly complete) CasperJS script to configure the Dynamic Navigation section of a GSA, because Google's API doesn't provide that ability...
(function () {
var system = require('system');
var casper = require('casper').create({
clientScripts : [ 'jquery.min.js' ],
waitTimeout : 30000, // ms
logLevel : 'debug', // info, debug, warning, or error
verbose : system.args.indexOf('-v') >= 0
});
@martinburch
martinburch / csvpys-one-liners
Last active February 9, 2024 21:12
One liners: commands to clean up your data using csvkit with csvpys on a Mac. ("So your data doesn't get the last laugh!")
#!/bin/bash
# Install csvkit with csvpys
# (csvpys hasn't been pulled back into the main csvkit repo that you can pip install)
git clone https://github.com/cypreess/csvkit.git
cd csvkit
python setup.py build
sudo python setup.py install
cd ~
@jbenet
jbenet / simple-git-branching-model.md
Last active April 15, 2026 22:32
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

#!ruby
# make sure we use version 2.x of Savon
gem 'savon', '~> 2.0'
require 'savon'
require 'nokogiri'
# create the client, switch on nice logging
clnt = Savon.client(
wsdl: 'http://www.webservicex.net/stockquote.asmx?wsdl',