Skip to content

Instantly share code, notes, and snippets.


Claudio Sanches claudiosanches

View GitHub Profile
jakebellacera / ICS.php
Last active Sep 18, 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.
jonathanmoore / gist:2640302
Created May 8, 2012
Get the share counts from various APIs
View gist:2640302

Share Counts

I have always struggled with getting all the various share buttons from Facebook, Twitter, Google Plus, Pinterest, etc to align correctly and to not look like a tacky explosion of buttons. Seeing a number of sites rolling their own share buttons with counts, for example The Next Web I decided to look into the various APIs on how to simply return the share count.

If you want to roll up all of these into a single jQuery plugin check out Sharrre

Many of these API calls and methods are undocumented, so anticipate that they will change in the future. Also, if you are planning on rolling these out across a site I would recommend creating a simple endpoint that periodically caches results from all of the APIs so that you are not overloading the services will requests.


SanderTheDragon /
Last active Sep 8, 2020
A shellscript to create a Postman .deb file, for simple installation on Debian-based Linux distro's. Also creates a .desktop file.
ls Postman*.tar.gz > /dev/null 2>&1
if [ $? -eq 0 ]; then
echo "Removing old Postman tarballs"
rm -f $(ls Postman*.tar.gz)
curlExists=$(command -v curl)
tsabat /
Last active Aug 31, 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
adamstac / gist:7441659
Last active Aug 1, 2020
Remove Sendmail from Ubuntu
View gist:7441659

Remove Sendmail from Ubuntu

This should help you completely uninstall Sendmail and all that comes with it.

First, stop the service (assuming it's running).

sudo /etc/init.d/sendmail stop

Uninstall sendmail and sendmail-bin

ImJasonH / markdown.css
Last active Jul 26, 2020
Render Markdown as unrendered Markdown (see
View markdown.css
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
joncave / endpoints.php
Created Jun 7, 2012
WP_Rewrite endpoints demo
View endpoints.php
Plugin Name: WP_Rewrite endpoints demo
Description: A plugin giving example usage of the WP_Rewrite endpoint API
Plugin URI:
Author: Jon Cave
Author URI:
function makeplugins_endpoints_add_endpoint() {
vigneshwaranr /
Created Aug 24, 2012
Script to convert SQLITE dumps into PostgreSQL compatible dumps
#! /bin/sh
usage_error () {
echo 'Usage: sh <path to> <path to sqlite db file> <an empty dir to output dump files>'
echo 'Example:'
echo '>sh ~/reviewboard.db /tmp/dumps'
echo 'Tested on:'
echo 'Python 2.7.3'
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)
fdaciuk / send_mail_post_pending.php
Last active May 12, 2020
Envia um e-mail para o administrador do site/blog se houver algum post para revisão. PS.: Configurar a conta que receberá o e-mail na variável $email. Por padrão, está configurado o e-mail do administrador do blog.
View send_mail_post_pending.php
Enviar e-mail para o administrador se houver posts para revisão
Dicas do @GugaAlves (@tudoparawp):
- Adicionar link para enviar e-mail diretamente para o administrador;
- Incluir link para a edição do post no admin, facilitando a vida do admin que receber este email.
Dicas do Gustavo Bordoni (@webord):
- incluir na função o $post (objeto para WP_Query) para não ficar passando o $post_id a cada save;
You can’t perform that action at this time.