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 | |
/** | |
* A class for performing minor calculations on large integer lists. | |
*/ | |
class Main | |
{ | |
private $buffSize; | |
private $list; | |
/** |
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 | |
/** | |
* Validate Age to be greater or equal to 18 | |
* | |
* @param $birthdate | |
* @return boolean | |
*/ | |
function validateAge($birthdate) | |
{ | |
$currentDate = new DateTime("now"); |
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 | |
$min = min( array_map("min", $multable) ); | |
$max = max( array_map("max", $multable) ); |
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
def shuffle_string(string) | |
string.split('').shuffle.join | |
end |
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
<snippet> | |
<content><![CDATA[ | |
class << ${1:self} | |
$0 | |
end | |
]]></content> | |
<tabTrigger>meta</tabTrigger> | |
<scope>source.ruby</scope> | |
</snippet> |
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
[ | |
{ | |
"keys": [".", "p"], | |
"command": "run_phpunit_test" | |
}, | |
{ | |
"keys": [".", "m"], | |
"command": "run_single_phpunit_test" | |
}, | |
{ |
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 ruby | |
# make sure you the watir gem installed -> gem install watir | |
require 'watir' | |
def log (message) puts " #{message}" end | |
def success (message) puts "+ #{message}" end | |
def fail (message) puts "- #{message}" end | |
def notify (message) | |
success message.upcase | |
system 'osascript -e \'Display notification Burgerbot with title "%s"\'' % message | |
rescue StandardError => e |
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 | |
opcache_reset(); | |
?> |
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 | |
// <!-- $string = "A man, a plan, a canal, Panama"; --> | |
function is_palindrome($string) | |
{ | |
$a = strtolower(preg_replace("/[^A-Za-z0-9]/", "", $string)); | |
return $a == strrev($a); | |
} |