Skip to content

Instantly share code, notes, and snippets.


Claudio Sanches claudiosanches

View GitHub Profile
jakebellacera / ICS.php
Last active Sep 28, 2020
A convenient script to generate iCalendar (.ics) files on the fly in PHP.
View ICS.php
* This is free and unencumbered software released into the public domain.
* Anyone is free to copy, modify, publish, use, compile, sell, or
* distribute this software, either in source code form or as a compiled
* binary, for any purpose, commercial or non-commercial, and by any
* means.
ilkka / tag_cloud_tag.rb
Created Nov 22, 2010
Jekyll tag cloud / tag pages plugin
View tag_cloud_tag.rb
module Jekyll
class TagCloudTag < Liquid::Tag
safe = true
def initialize(tag_name, text, tokens)
def render(context)
html = ""
stammy / Rakefile
Created Jan 24, 2011
rake task for creating a new jekyll post.
View Rakefile
# ignore the "bit" stuff.. only relevant to my custom jekyll fork
desc 'create new post or bit. args: type (post, bit), title, future (# of days)'
# rake new type=(bit|post) future=0 title="New post title goes here" slug="slug-override-title"
task :new do
require 'rubygems'
require 'chronic'
type = ENV["type"] || "bit"
title = ENV["title"] || "New Title"
wolfeidau / sass_converter.rb
Created May 7, 2011
Sass plugin for Jekyll
View sass_converter.rb
module Jekyll
# Sass plugin to convert .scss to .css
# Note: This is configured to use the new css like syntax available in sass.
require 'sass'
class SassConverter < Converter
safe true
priority :low
def matches(ext)
mfields / gist:965956
Created May 11, 2011
Wrap WordPress Enbeds in a div
View gist:965956
* Enclose embedded media in a div.
* Wrapping all flash embeds in a div allows for easier
* styling with CSS media queries.
* @todo Document parameters.
* @access private
mikejolley / template-print-processing-orders.php
Created Nov 4, 2011
WooCommerce - Print Processing orders. A template page snippet to (if you are logged in as admin) output all of your orders with 'processing' status (paid) ready for printing.
View template-print-processing-orders.php
Template Name: Print Processing Orders :)
if (!is_user_logged_in() || !current_user_can('manage_options')) wp_die('This page is private.');
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
mikejolley / template-stock-report.php
Created Dec 5, 2011
WooCommerce - Stock Report. A template page snippet to (if you are logged in as admin) output a list of products/stock (which you are managing stock for) ready for printing.
View template-stock-report.php
Template Name: Stock Report :)
if (!is_user_logged_in() || !current_user_can('manage_options')) wp_die('This page is private.');
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
tsabat /
Last active Sep 28, 2020
Getting oh-my-zsh to work in Ubuntu


apt-get install zsh
apt-get install git-core

Getting zsh to work in ubuntu is weird, since sh does not understand the source command. So, you do this to install zsh

wget -O - | zsh
helen / wp-chosen-tax-metabox.php
Last active May 1, 2019
Use Chosen for a replacement WordPress taxonomy metabox
View wp-chosen-tax-metabox.php
* WordPress Chosen Taxonomy Metabox
* Author: Helen Hou-Sandi
* Use Chosen for a replacement taxonomy metabox in WordPress
* Useful for taxonomies that aren't changed much on the fly and are
* non-hierarchical in nature, as Chosen is for flat selection only.
* You can always use the taxonomy admin screen to add/edit taxonomy terms.
* Categories need slightly different treatment from the rest in order to
dnaber-de / editor_plugin.js
Created Jan 22, 2012
Wordpress TinyMCE Popup-Dialog. German Tutorial on
View editor_plugin.js
// js/editor_plugin.js
* an example tinyMCE Plugin
* @param tinymce.Editor editor
* @param string url
You can’t perform that action at this time.