Skip to content

Instantly share code, notes, and snippets.

View flaviozantut's full-sized avatar
👽

Flávio Zantut flaviozantut

👽
View GitHub Profile
<?php if ( ! defined('BASEPATH')){exit('No direct script access allowed'); }
/**
* [descriçao da classe]
*
* @category Controllers
* @package [module_name]
* @author Flavio Zantut <[email protected]>
* @copyright 2012 Flavio Zantut
* @license GNU General Public License
*/
@flaviozantut
flaviozantut / gist:2690935
Created May 14, 2012 00:34
Namespace less
#teste {
.button {
display: block;
border: 1px solid black;
background-color: grey;
&:hover { background-color: red }
}
}
#bundle {
@flaviozantut
flaviozantut / standard.php
Created September 10, 2012 18:54
Standard comment block
<?php
/**
* Dash lib
*
* @category Admin
* @package Dash
* @author Flavio Zantut <[email protected]>
* @license MIT License <http://www.opensource.org/licenses/mit>
* @link http://link.com
*/
@flaviozantut
flaviozantut / Preferences.sublime-settings
Created September 25, 2012 21:16
default user config for Sublime Text 2
{
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
"font_size": 10,
"ignored_packages":
[
"Vintage"
],
"tab_size": 4,
"highlight_line": true,
"trim_trailing_white_space_on_save": true,
# Configure colors, if available.
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
c_reset='\[\e[0m\]'
c_user='\[\033[1;33m\]'
c_path='\[\e[0;33m\]'
c_git_clean='\[\e[0;36m\]'
c_git_dirty='\[\e[0;35m\]'
else
c_reset=
c_user=
@flaviozantut
flaviozantut / swap.sh
Created January 21, 2013 21:53
add swap M
sudo dd if=/dev/zero of=/mnt/file.swap bs=1M count=512
sudo mkswap /mnt/file.swap
sudo swapon /mnt/file.swap
/mnt/file.swap none swap sw 0 0
""" Deployment of your django project.
"""
from fabric.api import *
env.hosts = ['yourdomain.com']
env.user = "your-user"
def update_django_project():
""" Updates the remote django project.
{
"always_show_minimap_viewport": true,
"bold_folder_labels": true,
"caret_extra_width": 1,
"caret_style": "phase",
"close_windows_when_empty": false,
"color_scheme": "Packages/User/SublimeLinter/Clean (SL).tmTheme",
"copy_with_empty_selection": false,
"drag_text": false,
"draw_minimap_border": true,
<?php
class TestCase extends Illuminate\Foundation\Testing\TestCase {
// ...
public function appMock($name)
{
$mock = Mockery::mock($name);
App::instance($name, $mock);
@flaviozantut
flaviozantut / 0_reuse_code.js
Created October 8, 2013 21:39
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console