Skip to content

Instantly share code, notes, and snippets.

View claudiosanches's full-sized avatar
👨‍💻

Claudio Sanches claudiosanches

👨‍💻
View GitHub Profile
@claudiosanches
claudiosanches / nginx.conf
Created July 1, 2013 19:30
Django-CMS - Correção da URL do pt-br
rewrite ^/?pt\-BR/(.*)$ /pt-br/$1 permanent;
rewrite ^/?pt\_BR/(.*)$ /pt-br/$1 permanent;
@ribeiroevandro
ribeiroevandro / git-notifier
Created June 28, 2013 00:28
Facilitar o trabalho em equipe, usando o GIT como versionador de código.
#!/bin/bash
# Based on https://github.com/maxolasersquad/Git-Notifier/blob/master/gitnotify.sh
declare -A GN_LASTSHOW
GN_DURATION=120
for GN_BRANCH in `git branch -a | grep remotes/origin/master | sed 's/ -> .*//' | sed 's/^ //'`; do
GN_BRANCH_ARRAY=`echo ${GN_BRANCH} | sed 's/\//_/g'`
@claudiosanches
claudiosanches / .htaccess
Last active December 16, 2015 20:59
Custom php.ini
suPHP_ConfigPath /home/user/public_html
<Files php.ini>
order allow,deny
deny from all
</Files>
@claudiosanches
claudiosanches / fix-boleto.php
Last active December 16, 2015 10:59
Fix WooCommerce Boleto ID with WooCommerce Sequential Order Numbers
<?php
/**
* Plugin Name: Fix WooCommerce Boleto ID with WooCommerce Sequential Order Numbers
* Plugin URI: http://claudiosmweb.com/
* Description: WooCommerce Boleto is a brazilian payment gateway for WooCommerce
* Author: claudiosanches
* Author URI: http://claudiosmweb.com/
* Version: 0.1
* License: GPLv2 or later
*/
@vitorbritto
vitorbritto / devlist-bookmarks.md
Last active October 10, 2023 13:49
A BADASS list for faster Web Development! Recently, I decided to organize my bookmarks. So, like a good fellow, I am sharing with you. I hope you enjoy!

Dev List Bookmarks

Attention: the list was moved to https://github.com/vitorbritto/dev-list

This page is not maintained anymore, please update your bookmarks.


Recently, I decided to organize my bookmarks. So, like a good fellow, I am sharing with you. I hope you enjoy!

@bmihelac
bmihelac / processors.py
Last active December 15, 2015 19:18
easy-thumbnails watermark to right bottom corner of the image
# custom/processors.py
from django.conf import settings
from django.core.files.storage import default_storage
try:
from PIL import Image
except ImportError:
import Image
@fdaciuk
fdaciuk / .jshintrc
Last active December 15, 2015 13:19
Gruntfile.js padrão para projetos em WP.
{
"curly": true,
"eqeqeq": true,
"immed": true,
"latedef": true,
"newcap": true,
"noarg": true,
"sub": true,
"undef": true,
"boss": true,
@fdaciuk
fdaciuk / send_mail_post_pending.php
Last active May 12, 2020 23:43
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.
<?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;
@markoheijnen
markoheijnen / gist:4236025
Last active October 13, 2015 18:17
WordPress Engine shortcode
<?php
class Marko_Shortcodes {
public function __construct() {
add_shortcode( 'engine_info', array( $this, 'engine_info' ) );
}
public function engine_info( $atts ) {
global $wp_version, $wpdb, $batcache, $wp_object_cache;
@claudiosanches
claudiosanches / .gitignore
Created November 24, 2012 02:46
GIT: Include empty directories
# Ignore everything in this directory
*
# Except this file
!.gitignore