Skip to content

Instantly share code, notes, and snippets.

View juque's full-sized avatar

Juan Pablo Aqueveque juque

View GitHub Profile
@neilgee
neilgee / git.css
Last active July 22, 2025 08:36
Git Command Line Reference - Notes, Cheatsheet and reminders on Git set up and commands
/*
* Set up your Git configuration
*/
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
git config --global core.editor "nano"
@neilgee
neilgee / a-cpt.php
Last active September 15, 2024 06:51
CPT (Custom Post Type) - WordPress Plugin - there are 2 snippets here - the one name - cpt-hide.php hides the single and archive views, the other one is normal
<?php
/*
Plugin Name: Testimonials Custom Post Type
Plugin URI: http://wpbeaches.com/create-custom-post-types-in-genesis-child-theme-in-wordpress/
Description: Testimonials Custom Post Types
Author: Neil Gowran
Version:1.0.0
Author URI:http://wpbeaches.com
*/
<!-- breadcrumbs -->
<h2><!-- [colección] / [tipo] / [etiqueta] -->
{% if collection and product_type and tag %}
<a href="{{shop.url}}">Home</a> >
<a href="{{collection | typed_collection_path:product_type}}">
{{collection.title}} > {{product_type.name}}</a> > {{tag}}
<!-- [colección] / [tipo] -->
#!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',
@jbenet
jbenet / simple-git-branching-model.md
Last active July 21, 2025 21:02
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.

@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 ~
@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
});
@ismasan
ismasan / Gemfile
Last active December 16, 2015 21:58
source "https://rubygems.org"
gem 'sinatra'
group :development do
gem 'shotgun'
end
@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 {
<!-- 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 }}">