This file contains 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
<?php | |
/** | |
* Diesel Framework | |
* Copyright © LQDI Technologies - 2011 | |
* http://www.lqdi.net | |
* | |
* Serviço de abstração do banco de dados | |
* Light Database Abstraction Layer | |
* |
This file contains 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
{ | |
// Settings | |
"passfail" : false, // Stop on first error. | |
"maxerr" : 10000, // Maximum error before stopping. | |
// Predefined globals whom JSHint will ignore. | |
"browser" : true, // Standard browser globals e.g. `window`, `document`. | |
"node" : false, |
This file contains 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
Show hidden characters
{ | |
"files": | |
{ | |
"Dynamic-Carousel": "https://raw.github.com/Wilto/Dynamic-Carousel/master/plugin.js", | |
"FitText": "https://raw.github.com/davatron5000/FitText.js/master/jquery.fittext.js", | |
"FitVids": "https://raw.github.com/davatron5000/FitVids.js/master/jquery.fitvids.js", | |
"Lettering.js": "https://raw.github.com/davatron5000/Lettering.js/master/jquery.lettering.js", | |
"Normalize.css": "https://raw.github.com/necolas/normalize.css/master/normalize.css", | |
"Sass-Css3-Mixins": "https://raw.github.com/matthieua/Sass-Css3-Mixins/master/css3-mixins.scss", | |
"_rem.scss": "https://raw.github.com/ry5n/rem/master/stylesheets/_rem.scss", |
This file contains 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
Links, livros, artigos e etc comentados durante o Hangout 'JavaScript e Design Patterns': http://youtu.be/FkED71eM7s8 |
This file contains 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 User < ActiveRecord::Base | |
# ... | |
def self.sync_users | |
users_to_sync = where synced: false | |
SyncUsers.new(users_to_sync).tap &:sync | |
end | |
# ... | |
end | |
class UsersSyncer |
This file contains 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
<?php | |
// array com os dados | |
$data = array( | |
array( | |
"id" => 12, | |
"func" => "João dos Santos", | |
"urgencia" => "Sim", | |
"retirada" => "2013-07-24", | |
"prazo" => 10, |
This file contains 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
<?php | |
// Add the correct Content-Type for the cache manifest | |
header('Content-Type: text/cache-manifest'); | |
// Write the first line | |
echo "CACHE MANIFEST\n"; | |
// Initialize the $hashes string | |
$hashes = ""; |
This file contains 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
master_process on; | |
worker_processes 4; | |
worker_cpu_affinity 0001 0010 0100 1000; | |
worker_priority 0; | |
worker_rlimit_nofile 8192; | |
#error_log logs/error.log; | |
#error_log logs/error.log notice; | |
#error_log logs/error.log info; |
This file contains 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
/** | |
* Created by Mota on 10/08/2014. | |
*/ | |
module.exports = function(grunt) { | |
var mountFolder = function (connect, dir) { | |
return connect.static(require('path').resolve(dir)); | |
}; |
This file contains 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
// a list of useful queries for profiler analysis. Starting with the most basic. | |
// 2.4 compatible | |
// | |
// output explained: | |
// | |
{ | |
"ts" : ISODate("2012-09-14T16:34:00.010Z"), // date it occurred | |
"op" : "query", // the operation type | |
"ns" : "game.players", // the db and collection |
OlderNewer