Skip to content

Instantly share code, notes, and snippets.

<?php
$zones = DateTimeZone::listIdentifiers();
$sql = "INSERT INTO timezone (timezone_id, timezone_name) VALUES\n";
$lastKey = count($zones) - 1;
$separator = ',';
echo $sql;
foreach($zones as $key => $zone) {
<?php
class ErgebnisdienstParse {
private $url = 'http://ergebnisdienst.fussball.de/begegnungen/kreisliga-a/kreis-essen-sued-ost/kreisliga-a/herren/spieljahr1314/niederrhein/-/staffel/01HOG4T9OK000000VV0AG813VU6JDNLO-G/mandant/22';
private $parser;
public $innerhtml;
nstall php-phpunit-PHPUnit
Loaded plugins: priorities, update-motd, upgrade-helper
amzn-main/latest | 2.1 kB 00:00
amzn-updates/latest | 2.3 kB 00:00
Resolving Dependencies
--> Running transaction check
---> Package php-phpunit-PHPUnit.noarch 0:3.7.19-1.5.amzn1 will be installed
--> Processing Dependency: php-pear(pear.phpunit.de/PHP_CodeCoverage) <= 1.2.99 for package: php-phpunit-PHPUnit-3.7.19-1.5.amzn1.noarch
--> Processing Dependency: php-pear(pear.symfony.com/Yaml) <= 2.2.99 for package: php-phpunit-PHPUnit-3.7.19-1.5.amzn1.noarch
--> Processing Dependency: php-pear(pear.phpunit.de/PHPUnit_MockObject) <= 1.2.99 for package: php-phpunit-PHPUnit-3.7.19-1.5.amzn1.noarch
// set a namespace
var foo = {};
foo.bar = {};
// parent class
foo.bar.Person = function(name) {
this.name = name;
};
/*
* @Description:
*
*/
(function(global, $){
// namespace on global scope
global.company = global.company || {},
global.company.post = global.company.post || {};
/*
* @Description:
* Singleton Pattern
* Creates an instances of the logged in user.
*
*/
(function(global, $){
// namespace on global scope
global.alwasatt = global.alwasatt || {};
@irfan
irfan / pr.md
Created March 25, 2013 10:49 — forked from piscisaureus/pr.md

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

// view class
var view = function(template){
this.template = template;
};
view.prototype = {
generateTemplate: function(){
// implementation
return $(this.template);
}
// Example js oop explanining in turkish!
(function(){
var Foo = function(name, list){
this.name = name;
if(list){
this.list = list;
}
}
Foo.prototype = {
@irfan
irfan / data.js
Created November 29, 2012 08:48
data structure
/*
* General structure
*/
{
"message": {
"text": 'You got 404',
"type": 'warning'
"code": 404
},