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 | |
$filter_r=216; | |
$filter_g=0; | |
$filter_b=26; | |
$suffixe="_red"; | |
$path=YOURPATHFILE; | |
if(is_file($path)){ | |
$image=@imagecreatefromjpeg($path); | |
$new_path=substr($path,0,strlen($path)-4).$suffixe.".png"; |
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
var handleCheckAlternative = function(result) { | |
var playSound = playWrongAudio; | |
var after = renderInfos; | |
if (isLastQuestion(result)) { | |
after = _.compose(renderPoints, quizOver); | |
} | |
if (result.correct && isLastQuestion(result)) { | |
playSound = playTouchdown; | |
} | |
else if (result.correct) { |
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 | |
class Destaque extends Aware { | |
const STATUS_PUBLISHED = 1; | |
const STATUS_UNPUBLISHED = 0; | |
public static $rules = array( |
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 | |
$trocar = 'tentar'; | |
$conteudo = <<<DEMO | |
Isto é um teste. Vamos $trocar dados. | |
DEMO; | |
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 | |
class Krudder { | |
public static function add($route, $modelName) | |
{ | |
App::bind("Krudder$route", function() use($route, $modelName) | |
{ | |
return new KrudderController($route, $modelName); | |
}); |
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 | |
class Scorer { | |
private $canonical; | |
private $game; | |
public function __construct($game) | |
{ |
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
{ | |
"collection": { | |
"version": "1.0", | |
"href": "http://www.youtypeitwepostit.com/api/", | |
"items": [ | |
{ | |
"href": "/api/messages/21818525390699506", | |
"data": [ | |
{ | |
"name": "text", |
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
var _ = require('lodash'); | |
module.exports = _.curry(replaceParent, 2); | |
function replaceParent(element, html) { | |
var parent = element.parentNode; | |
parent.innerHTML = html; | |
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
var GmapComponent = require('./google-maps-component'); | |
var component = GmapComponent({ | |
lat: -23.5348644, lng: -46.6718231 | |
}); | |
var node = document.getElementById('main'); | |
React.renderComponent(component, node); |
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 | |
/* | |
* From: http://stackoverflow.com/questions/3392993/php-regex-to-get-youtube-video-id | |
*/ | |
$url = "http://www.youtube.com/watch?v=C4kxS1ksqtw&feature=relate"; | |
parse_str( parse_url( $url, PHP_URL_QUERY ), $my_array_of_vars ); | |
echo $my_array_of_vars['v']; | |
// Output: C4kxS1ksqtw |