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
# foo | |
## foo | |
--- | |
- ul | |
- li | |
- li |
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
css: | |
sass public/css/main.scss | autoprefixer > public/var/styles.css | |
watch: | |
chokidar 'public/js/**/*.scss' 'public/css/**/*.scss' -c 'time make css' | |
test_chrome: | |
karma start config/karma.conf.js --single-run --browsers Chrome | |
test_ff: |
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 | |
// Mustache only support single dimensional array | |
// With this patch, we can pass an array of objects to Mustache::renderString | |
$string = '{{var.foo}}'; | |
$parameters = array('var' => new Object()); |
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
array | |
0 => | |
array | |
empty | |
1 => | |
array | |
empty | |
2 => | |
array | |
empty |
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
security: | |
access_control: | |
- { path: /admin/.*, role: ROLE_ADMIN } | |
- { path: /.*, role: IS_AUTHENTICATED_ANONYMOUSLY } | |
encoders: | |
admin: { algorithm: sha1, class: Sas\CoreBundle\Entity\Account } | |
providers: | |
fos_user: | |
id: fos_user.user_manager | |
firewalls: |
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
security: | |
acl: ~ | |
access_control: | |
- { path: /admin/.*, role: ROLE_ADMIN, host: resowl2.com } | |
- { path: /.*, roles: [IS_AUTHENTICATED_ANONYMOUSLY, ROLE_USER] } | |
encoders: | |
admin: { algorithm: sha1, class: Sas\CoreBundle\Entity\Account } | |
providers: | |
fos_user: | |
id: fos_user.user_manager |
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] | |
;;;;;;;;;;;;;;;;;;; | |
; About php.ini ; | |
;;;;;;;;;;;;;;;;;;; | |
; PHP's initialization file, generally called php.ini, is responsible for | |
; configuring many of the aspects of PHP's behavior. | |
; PHP attempts to find and load this configuration from a number of locations. | |
; The following is a summary of its search order: |
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 | |
$lines = file('http://mxr.mozilla.org/mozilla-central/source/netwerk/dns/effective_tld_names.dat?raw=1'); | |
$two = array(); | |
$three = array(); | |
$four = array(); | |
$five = array(); | |
foreach ($lines as $line) { |
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 | |
foreach ($this->models as $model) { | |
$_file = '../' . $this->app . 'Models/' . $model . 'Model.php'; | |
$_class = $model . 'Model'; | |
if (file_exists($_file)) { | |
require_once $_file; | |
$this->{ucfirst($model)} = new $_class(null, dbConfig::$default); | |
} else { |
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 | |
// Alternative to the long polling system used in lichess (github.com/ornicar/lichess) | |
// - We could use an ajax request on a php script with an infinite loop until version has changed. | |
$userVersion = $_GET['version'] | |
$version = $db->stack->find($_GET['player_id'])->getVersion(); | |
while ($userVersion <= $version) { | |
usleep(10000); |
OlderNewer