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
# mkdir -p slim_bloggin_app/{app/{routes,views},public/{css,js,img}} && cd slim_bloggin_app && touch app/bootstrap.php app/routes.php public/index.php public/.htaccess | |
# tree -a | |
. | |
├── .DS_Store | |
├── app | |
│ ├── bootstrap.php | |
│ ├── routes | |
│ ├── routes.php | |
│ └── views |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> | |
<meta name="description" content=""> | |
<meta name="author" content="Umanda Jayobandara"> | |
<link rel="shortcut icon" href="assets/images/ico/favicon.ico"> |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the 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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>Unicode detector</title> | |
<script> | |
function myFunction() { | |
var x = document.getElementById("frm1"); | |
var data = ""; | |
data = x.elements[0].value; |
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 isset_get($array, $key, $default = null) { | |
return isset($array[$key]) ? $array[$key] : $default; | |
} | |
$myVar = isset_get($someArray, 'someKey'); | |
//or with some default if you got one | |
$myVar = isset_get($someArray, 'someKey', $mydefault); |
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 gotoLabels= {}; | |
var whileLabels = {}; | |
Selenium.prototype.reset = function() { | |
this.initialiseLabels(); | |
this.defaultTimeout = Selenium.DEFAULT_TIMEOUT; | |
this.browserbot.selectWindow("null"); | |
this.browserbot.resetPopups(); | |
} |
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 HelloTest extends \PHPUnit_Framework_TestCase { | |
public function testTrueIsTrue() | |
{ | |
$foo = true; | |
$foo2 = false; | |
$this->assertTrue($foo); | |
$this->assertFalse($foo2); | |
} | |
} |
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
/** | |
* Validate JSON String | |
* @param String $json | |
* @return boolean | |
*/ | |
protected function isValidJson($json) { | |
json_decode($json); | |
return (json_last_error() == JSON_ERROR_NONE); | |
} |
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
<div class="row reorder-xs"> | |
<div class="col-xs-12"> | |
<p>test1</p> | |
</div> | |
<div class="col-xs-12"> | |
<p>test2</p> | |
</div> | |
</div> |
OlderNewer