Skip to content

Instantly share code, notes, and snippets.

View agutoli's full-sized avatar
🎯
Focusing

Bruno Agutoli agutoli

🎯
Focusing
View GitHub Profile
/**
* Proxy method that receive "bootstrap thisObj"
*
* @param (Bootstrap)boot
* @method Proxy
*/
var test = function(boot,settings,app,timets) {
var pubs = {};
pubs.proc = function(req,res,next) {
@agutoli
agutoli / error.py
Created March 23, 2014 21:30
Tornado error
Traceback (most recent call last):
File "./pyromanager.py", line 6, in <module>
run_command()
File "/usr/local/lib/python2.7/dist-packages/pyrocumulus-0.3_b3-py2.7.egg/pyrocumulus/commands/base.py", line 151, in run_command
command.run()
File "/usr/local/lib/python2.7/dist-packages/pyrocumulus-0.3_b3-py2.7.egg/pyrocumulus/commands/runtornado.py", line 62, in run
self.application = self.get_application()
File "/usr/local/lib/python2.7/dist-packages/pyrocumulus-0.3_b3-py2.7.egg/pyrocumulus/commands/runtornado.py", line 172, in get_application
module = import_module(module_name)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
app.FindGrepPreferences = idNothingEnum.idNothing
app.ChangeGrepPreferences = idNothingEnum.idNothing
app.FindChangeGrepOptions.IncludeFootnotes = False
app.FindChangeGrepOptions.IncludeHiddenLayers = False
app.FindChangeGrepOptions.IncludeLockedLayersForFind = False
app.FindChangeGrepOptions.IncludeLockedStoriesForFind = False
app.FindChangeGrepOptions.IncludeMasterPages = False
mycharstyle = doc.CharacterStyles("SK-number1")
app.ChangeGrepPreferences.AppliedCharacterStyle = mycharstyle
app.FindGrepPreferences.FindWhat = "(?<=\t)(\d{4}.*~b)"
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Jaobi Lib APi example</title>
<script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-2.1.0.min.js"></script>
<script src="jquery.cookie.js"></script>
</head>
<body>
@agutoli
agutoli / 0_reuse_code.js
Created May 29, 2014 18:15
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
<!-- ESTE É O CONTAINER -->
<div class="u_info shadow score_container" id="/fd/">
<!-- FIM CONTAINER -->
<span class="avatar"><img src="http://www.gravatar.com/avatar/eb7772c154cb4cfb1bae58a9266f35a6.png?s=50&amp;d=mm"></span>
<span class="u_i">
<div>
<div id="score_bts">
<a href="/fd/channel" data-ajax="false" data-mini="true" data-role="button" data-theme="c" class="desc ui-btn ui-shadow ui-btn-corner-all ui-mini ui-btn-inline ui-btn-up-c" data-inline="true" data-corners="true" data-shadow="true" data-iconshadow="true" data-wrapperels="span"><span class="ui-btn-inner"><span class="ui-btn-text">
@agutoli
agutoli / exemplo_tse.xml
Created October 21, 2014 18:49
Dados contidos no XML do TSE
<Abrangencia
dataTotalizacao="19/09/2014"
horaTotalizacao="15:16:00"
totalizacaoFinal="N"
tipoAbrangencia="UF"
codigoAbrangencia="SP"
secoesTotalizadas="0"
secoesNaoTotalizadas="88753"
eleitoradoApurado="0"
eleitoradoNaoApurado="31979717"
@agutoli
agutoli / People.php
Last active August 29, 2015 14:09
Zend model example
<?php
/**
* Model that handles the data of Table
*
* @author btlagutoli
*/
Class People extends Oo_Db_Table {
public $_schema = [
"name" => [CharField, 'required' => true, 'maxlength' => 100],
@agutoli
agutoli / ExampleController.php
Last active August 29, 2015 14:09
Controller example
<?php
class ExampleController extends Zend_Controller_Action
{
public function indexAction() {
$people = People::all();
/**
* Output: [<People: Jãozinho>, <People: Maria>, <People: Kelly>...]
<!DOCTYPE html>
<html>
<head>
<title>Explosion Effect</title>
<script src="//ajax.googleapis.com/ajax/libs/mootools/1.4.5/mootools-yui-compressed.js">
</script>
<script>