Skip to content

Instantly share code, notes, and snippets.

View mateusreis's full-sized avatar

Mateus Reis mateusreis

View GitHub Profile
@mateusreis
mateusreis / gist:4561146
Created January 18, 2013 00:13
Wordpress display number of queries
function wpshow_footer_queries(){
echo '<!-- Queries: '.get_num_queries().' in '.timer_stop(0).' seconds. -->'.PHP_EOL;
}
add_action('wp_footer', 'wpshow_footer_queries');

Sublime Text 2 – Useful Shortcuts (Ubuntu)

General

Ctrl+KB toggle side bar
Ctrl+Shift+P command palette
Ctrl+` python console
Ctrl+N new file

Editing

@mateusreis
mateusreis / index_smartphone.html
Last active December 11, 2015 22:58
Smartphone blank template.
<!DOCTYPE html>
<!--[if IEMobile 7 ]> <html class="no-js iem7"> <![endif]-->
<!--[if (gt IEMobile 7)|!(IEMobile)]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<title> Page title </title>
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
<meta http-equiv="cleartype" content="on">
@mateusreis
mateusreis / bashrc
Created January 30, 2013 13:40
bashrc // ubuntu
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
source /usr/local/bin/virtualenvwrapper.sh
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
@mateusreis
mateusreis / form.css
Created January 30, 2013 19:19
formy-css-framework - Formy - CSS Form Framework (http://code.google.com/p/formy-css-framework/)
/* Formy - CSS Framework 0.8 */
/*
reset.css
*/
fieldset, form, label, legend
{ margin:0;padding:0;border:0;font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline; }
/*
@mateusreis
mateusreis / gist:4692830
Last active December 12, 2015 01:39
.Guardfile
# https://github.com/guard/guard-livereload
guard :livereload do
watch(%r{.+\.(css|scss|js|htm|htm|html|php)$})
end
@mixin gradient($from, $to) {
/* fallback/image non-cover color */
background-color: $from;
/* Firefox 3.6+ */
background-image: -moz-linear-gradient($from, $to);
/* Safari 4+, Chrome 1+ */
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from($from), to($to));
#!/bin/bash
# Updated: Wed Apr 10 21:04:12 2013 by webmaster@askapache
# @ http://uploads.askapache.com/2013/04/gnu-mirror-index-creator.txt
# Copyright (C) 2013 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
@mateusreis
mateusreis / html1.sublime-snippet
Created July 31, 2013 12:12
snippet para o Sublime2
<snippet>
<content><![CDATA[
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
/*********************************************************************
* css
*********************************************************************/
@mateusreis
mateusreis / html1.sh
Last active December 24, 2015 12:38
Shell script that clones small framework.
#!/bin/bash
# em /usr/local/bin/
CURRENT=`pwd`
DIR=`basename $CURRENT`
echo " "
echo "html1 [branch] Clona um branch específico sem criar um repositório."
echo " "
echo " Ver lista de branchs em https://github.com/mateusreis/small.git"