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 importTask extends sfTask | |
{ | |
protected function execute($arguments = array(), $options = array()) | |
{ | |
$xml = simplexml_load_file('file'); | |
$users = array(); | |
foreach ($xml->users as $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
<script> | |
// test for localStorage support | |
if(('localStorage' in window) && window['localStorage'] !== null){ | |
var f = document.getElementById('mainform'); | |
// test with PHP if the form was sent (the submit button has the name "sent") | |
<?php if(isset($_POST['sent']))){?> | |
// get the HTML of the form and cache it in the property "state" | |
localStorage.setItem('state',f.innerHTML); |
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 privateConfiguration extends sfApplicationConfiguration { | |
public function configure() { | |
$this->dispatcher->connect('view.configure_format', array($this, 'listenToViewConfigureFormatEvent')); | |
} |
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
alias ack='ack-grep --type-set twig=.twig' |
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
Show hidden characters
[ | |
{ "keys": ["ctrl+shift+x"], "command": "tidy_xml" }, | |
{ "keys": ["ctrl+shift+j"], "command": "prettify_json" } | |
] |
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
namespace :symfony do | |
namespace :assets do | |
desc "Updates assets version" | |
task :update_version do | |
run "sed -i 's/\\(assets_version: \\)\\(.*\\)$/\\1 #{real_revision}/g' #{latest_release}/app/config/config.yml" | |
end | |
end | |
end | |
before "symfony:assetic:dump" do |
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/bash | |
INPUT_FILE=$1 | |
LINES_PER_FILE=$2 | |
if [ -z $LINES_PER_FILE ]; then | |
LINES_PER_FILE=1000 | |
fi | |
if [ -z $INPUT_FILE ]; then |
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
// place this 'PHP.sublime-build' file in ~/.config/sublime-text-2/Packages/User/ | |
{ | |
"cmd": ["/usr/bin/php", "-l", "$file"], | |
"selector": "source.php", | |
"file_regex": "^Parse error: .* in (.*?) on line ([0-9]*)" | |
} | |
// Then restart ST2 & type 'CTRL+B' to use it |
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
// Stocker une valeur | |
sessionStorage.setItem('key', 'value'); | |
localStorage.setItem('key', 'value'); | |
// Récupérer une valeur | |
var item = sessionStorage.getItem('key'); | |
var item = localStorage.getItem('key'); | |
// Supprimer une valeur | |
sessionStorage.removeItem('key'); |
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
{ | |
"require": { | |
"behat/behat": ">=2.2.2", | |
"behat/mink": ">=1.3.2" | |
}, | |
"repositories": { | |
"behat/mink-deps": { "composer": { "url": "behat.org" } } | |
} | |
} |
OlderNewer