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
apiCall: function(params) { | |
var user = Session.get('username') | |
var pass = Session.get('password') | |
// remove params we can't override | |
delete params.beforeSend | |
params.url = baseApiUrl + Session.get('twitter_id') + params.url | |
var ajaxParams = _.extend({ |
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
### | |
### Debian configuration | |
### | |
# --- Bashrc --- | |
echo " |
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
{ | |
"type": "Cors" | |
} |
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 | |
function timezone_options() | |
{ | |
$zones = array( | |
‘Africa’, | |
‘America’, | |
‘Antarctica’, | |
‘Arctic’, | |
‘Asia’, |
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 get_timezone_infos() { | |
var now = new Date(); | |
var jan1 = new Date(now.getFullYear(), 0, 1, 0, 0, 0, 0); | |
var temp = jan1.toGMTString(); | |
var jan2 = new Date(temp.substring(0, temp.lastIndexOf(‘‘) — 1)); | |
var offset = (jan1 — jan2) / (1000); | |
var june1 = new Date(now.getFullYear(), 6, 1, 0, 0, 0, 0); | |
temp = june1.toGMTString(); | |
var june2 = new Date(temp.substring(0, temp.lastIndexOf(‘‘) — 1)); |
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 | |
// set the timezone of the current user before calling the function | |
date_default_timezone_set(‘Europe/Paris’); | |
function toUser($dateTime) | |
{ | |
$dateTime->setTimezone(new DateTimeZone(date_default_timezone_get())); | |
return $dateTime; | |
} |
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 | |
try { | |
$db = new Database($dsn, $user, $password); | |
} catch (RuntimeException $e) { | |
echo ‘Error during connection : ‘ . $e->getMessage(); | |
} |
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 Car { | |
protected $speed; | |
protected $engine; | |
public function __construct(Engine $engine) { | |
$this->engine = $engine; | |
} |