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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8" /> | |
| <title>Teste icanhaz</title> | |
| <link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.1.1/css/bootstrap-combined.min.css" rel="stylesheet" type="text/css"> | |
| </head> | |
| <body> | |
| <div class="container"> |
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
| #!/usr/bin/env php | |
| <?php | |
| $a = range(0, 20); | |
| $divisibleBy = 3; | |
| // array_values: normalize the retuning indices | |
| // array_filter: perform a select | |
| $b = array_values(array_filter($a, function ($value) use ($divisibleBy) { | |
| return (($value % $divisibleBy) == 0); |
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
| #!/usr/bin/env coffee | |
| http = require 'http' | |
| user = 'felds' | |
| count = 10 | |
| url = "http://api.twitter.com/1/statuses/user_timeline.json?screen_name=#{user}&count=#{count}" | |
| http.get url, (response) -> | |
| buffer = new Buffer 0 |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <aiml version="1.0"> | |
| <template> | |
| Começo do texto ”<srai>include</srai>” fim do texto. | |
| </template> | |
| </aiml> |
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
| <?php | |
| function everythingEntities($str, $pattern = '/./u') | |
| { | |
| return preg_replace_callback($pattern, function ($match) { | |
| list(, $ord) = unpack('N', mb_convert_encoding($match[0], 'UCS-4BE', 'UTF-8')); | |
| return sprintf('&#%s;', $ord); | |
| }, $str); | |
| } |
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
| <?php | |
| /** | |
| * @param string $dir The dir to be removed | |
| */ | |
| function deleteTempDir($dir) | |
| { | |
| return `rm -fr $dir`; | |
| } |
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
| <?php | |
| // unsecure execution | |
| $bug = '"() { :;} ; echo vulnerable" bash -c "echo "'; | |
| passthru("env X=$bug"); // outputs: "vulnerable" | |
| // secure execution using escapeshellarg | |
| $bug = escapeshellarg('"() { :;} ; echo vulnerable" bash -c "echo "'); | |
| passthru("env X=$bug"); // what it should (the dump of env) |
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
| <?php | |
| /** | |
| * Usage: | |
| * ms(12345, 3) # returns "37035" | |
| * ms(999, 3) # returns "2997" | |
| * ms("1111", 24) # returns "26664" | |
| * | |
| * @param int|stirng $s A string containing a positive integer | |
| * @param int $m The multiplier | |
| * @return string The product of the multiplication (as a string) |
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
| // ---- | |
| // libsass (v3.3.2) | |
| // ---- | |
| $silent-classes: true; | |
| %card { | |
| content: ".card definitions"; | |
| } | |
| %card-header { |
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
| const gulp = require('gulp'); | |
| const plumber = require('gulp-plumber'); | |
| const notify = require('gulp-notify'); | |
| const plumber_notifier = plumber({ | |
| errorHandler: notify.onError({ | |
| title: "Oops!", | |
| message: "<%= error.message %>", | |
| }), | |
| }); |