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 | |
session_start(); | |
require_once 'vendor/autoload.php'; | |
$consumerKey = 'doTy109KhSbt4QKzdYWDns7lIWMhiehHKJ29NNsc6VS0CImPUU'; | |
$consumerSecret = 'AsPvCGXe13Ydvcovu8uCyX4WhNk7chLoGM7bNMpH7hjQgA8FhI'; | |
$tmpToken = isset($_SESSION['tmp_oauth_token'])? $_SESSION['tmp_oauth_token'] : null; | |
$tmpTokenSecret = isset($_SESSION['tmp_oauth_token_secret'])? $_SESSION['tmp_oauth_token_secret'] : null; |
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
#!/bin/sh | |
NOW=$(date +"%Y-%m-%d_%H%M%S") | |
ZIP_FILENAME="git_diff_$NOW.zip" | |
FROM_SHA="HEAD~" | |
TO_SHA="HEAD" | |
FOREGROUND_COLOR="\033[0m" | |
GREEN_COLOR="\033[0;32m" | |
RED_COLOR="\033[0;31m" |
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
#!/bin/sh | |
php app/console $@ |
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 TestClass | |
{ | |
private $someVar; | |
public function __construct() | |
{ | |
$this->someVar = 10; |
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
function doubleInteger(i) { | |
// i will be an integer. Double it and return it. | |
return i * 2; | |
} | |
function isNumberEven(i) { | |
// i will be an integer. Return true if it's even, and false if it isn't. | |
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
function fibonacci(n) | |
{ | |
if (n < 0) { | |
return; | |
}else if (n < 2) { | |
return '10'[n]; | |
} | |
return fibonacci(n-1)+''+fibonacci(n-2) | |
} |
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
<script src="//code.jquery.com/jquery-2.1.0.min.js"></script> | |
<style type="text/css"> | |
table { | |
font-size: 1px; | |
line-height: 1px; | |
} | |
</style> | |
<!--WARNING!!!! Only local image--> |
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
<script src="//code.jquery.com/jquery-2.1.0.min.js"></script> | |
Result: <div id="result"></div> | |
<script> | |
function hasAllPatterns(string) { | |
var requiredDigits = [ | |
0, | |
1,2,3,4,5,6,7,8,9, |
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 | |
namespace CoreBundle\Service\Expert; | |
use Codeception\Util\Stub; | |
use Domain\CoreBundle\Service\Expert\ExpertManager; | |
use Codeception\Configuration as Configuration; | |
use Codeception\Exception\Module as ModuleException; | |
use Domain\CoreBundle\Entity\User; |
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
$('body').on('activate.bs.scrollspy', function(e) { | |
var hash = $(e.target).find('a').attr('href'); | |
if(history.pushState) { | |
history.pushState({}, "", hash); | |
} else { | |
// Uncomment this for ie8 or ie9 | |
//window.location.hash = hash; | |
} |
OlderNewer