This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git config --global alias.lg "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| REGIOES_BRASILEIRAS = { | |
| 'Norte' => [ | |
| ['Acre', 'AC'], | |
| ['Amapá','AP'], | |
| ['Amazonas', 'AM'], | |
| ['Pará', 'PA'], | |
| ['Rondônia', 'RO'], | |
| ['Roraima', 'RR'], | |
| ['Tocantins', 'TO'] | |
| ], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /bin/sh | |
| ### BEGIN INIT INFO | |
| # Provides: mongodb | |
| # Author: Emerson Macedo - http://github.com/emerleite - http://codificando.com | |
| # Required-Start: $all | |
| # Required-Stop: $all | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: 0 1 6 | |
| # Short-Description: starts the mongodb data-store |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace :cache do | |
| desc 'Clear memcache' | |
| task :clear => :environment do | |
| ActionController::Base.cache_store.clear | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class BlackHoleStore | |
| def clear; end | |
| def logger | |
| Rails.logger | |
| end | |
| def fetch( *args ) | |
| yield | |
| end | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| update wp_options set option_value = 'http://codificando.com' where option_name in ('siteurl', 'home', 'blogname'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| ### BEGIN INIT INFO | |
| # Provides: Start Selenium server | |
| # Author: Emerson Macedo - http://github.com/emerleite - http://codificando.com | |
| # Description: Manage selenium server start and stop | |
| ### END INIT INFO | |
| NAME="selenium" | |
| PIDFILE="./selenium.pid" | |
| LOGFILE="./selenium.log" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| ### BEGIN INFO | |
| # Provides: OSX Apache configuration Clone | |
| # Author: Emerson Macedo - http://github.com/emerleite - http://codificando.com | |
| # Description: Clones apache configuration into new one. Works only on OSX | |
| ### END INFO | |
| echo "" | |
| if [ $# -lt 3 ] | |
| then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| ### BEGIN INFO | |
| # Provides: Flex-SDK and FlexUnit | |
| # Author: Emerson Macedo - http://github.com/emerleite - http://codificando.com | |
| # Description: Install Flex-SDK and FlexUnit. Ajust environment configuration | |
| ### END INFO | |
| ensure_installed() { | |
| if [ ! `type -P $1` ] | |
| then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var sys = require('sys'); | |
| sys.puts("Top level"); | |
| sys.puts(" this === GLOBAL: " + (this === GLOBAL)); // false | |
| sys.puts(" this === exports: " + (this === exports)); // true | |
| var x = "1"; // local variable | |
| sys.puts(" x === GLOBAL.x: " + (x === GLOBAL.x)); // false |
OlderNewer