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
/** | |
* This is a minimal working setup for using Google Closure Tools. | |
* | |
* One thing I've used extensivelly that is not covered here is support for | |
* i18n, which would require generating a messages file, translating it and | |
* passing it into the js compilation step. | |
* | |
* Also not covered is CSS minification, but you can (probably) just enable | |
* that by passing the appropriate flag in the compile-css step. | |
* |
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
#!/usr/bin/env python | |
""" A simple example of overloading the plus operator. | |
Instances are created by passing a notation consisting of a numerical value followed by one of the supported | |
dimensions (m, cm, mm) separated by a single space. | |
Adding two values initialized with different dimensions returns an object with the dimension of the first value. | |
Example: |
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
// Revela todas as máscaras. | |
function revealMasks(event) { | |
event.stopPropagation(); | |
event.preventDefault(); | |
if( typeof dataLayer !== 'undefined') { | |
dataLayer.push({'event': 'RevealMask'}) | |
dataLayer.push({'ListingPageType': 'conversion'}); | |
dataLayer.push({'event': 'PageTypeChange'}) | |
} | |
$('.contactMask').fadeOut(); |
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
// Conversion, ConversionDiganos, ConversionWhatsApp, etc... | |
if( typeof dataLayer !== 'undefined') { | |
dataLayer.push({'event': 'Conversion'}) | |
} |
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
// Ao digitar 3 caracteres no 1o campo do formulário. | |
if( typeof dataLayer !== 'undefined') { | |
dataLayer.push({'ListingPageType': 'conversionintent'}); | |
dataLayer.push({'event': 'PageTypeChange'}) | |
} | |
// No sucesso do envio do formulário. | |
if( typeof dataLayer !== 'undefined') { | |
dataLayer.push({'ListingPageType': 'conversion'}); | |
dataLayer.push({'event': 'PageTypeChange'}) |
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
// Em todas as páginas. | |
if( typeof dataLayer !== 'undefined') { | |
dataLayer.push({'ListingId': '...'}); | |
dataLayer.push({'ListingTotalValue': ...}); | |
dataLayer.push({'ListingPageType': '...'}); | |
dataLayer.push({'event': 'PageTypeChange'}) | |
} |
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
# npm run dev | |
> parabol-action@0.3.1 dev /home/atannus/com.parabolinc.action | |
> NODE_ENV=development node ./src/server/server.babel.js | |
[Busy] Launching SocketCluster | |
>> Broker PID: 22307 | |
Creating a pool connected to localhost:28015 | |
>> Worker PID: 22319 | |
[Active] SocketCluster started |
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
> plot(1:10, 1:10) | |
Error in (function (display = "", width, height, pointsize, gamma, bg, : | |
X11 module cannot be loaded | |
In addition: Warning message: | |
In (function (display = "", width, height, pointsize, gamma, bg, : | |
unable to load shared object '/usr/lib/R/modules//R_X11.so': | |
/usr/lib/x86_64-linux-gnu/libpng12.so.0: version `PNG12_0' not found (required by /usr/lib/R/modules//R_X11.so) | |
> qplot(1:10, 1:10) | |
Error in (function (display = "", width, height, pointsize, gamma, bg, : | |
X11 module cannot be loaded |
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 | |
$path = 'test.xml'; | |
$reader = new XMLReader(); | |
$reader->open($path); | |
while ( $reader->read() ) | |
{ | |
//$name = $reader->name; |
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 defined('SYSPATH') or die('No direct script access.'); | |
class Kohana extends Kohana_Core { | |
/** | |
* Augments the core method for two reasons: | |
* 1) Reserve an extra 1M memory to allow handling memory_limit violation. | |
* 2) Reserve more exec time to allow max_execution_time violation. | |
* | |
* Note: keep variable creation at a minimum. |
NewerOlder