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 PUBLIC "-//W3C//DTD HTML 4.01//EN"> | |
<html> | |
<head> | |
{{ html.charset() }} | |
<title>{{ 'CakePHP: the rapid development php framework'|trans }}: {{ title_for_layout }}</title> | |
{{ html.meta('icon') }} | |
{{ html.css('cake.generic') }} | |
{{ scripts_for_layout }} | |
</head> | |
<body> |
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
{{[ | |
html.docType, | |
html.tag( 'html',[ | |
html.tag( 'head',[ | |
html.charset, | |
html.tag( 'title', title_for_layout|trans ), | |
html.css([ | |
'cake.generic' | |
], null, [ 'media' : 'screen, projection' ]), | |
html.script([ |
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
$config = { | |
"application" => "DOMAIN.TLD", | |
"repository" => "git@GITHOST:USERNAME/REPOSITORYNAME.git", | |
"remoteusername" => "REMOTEUSERNAME", | |
"cake_folder" => "/PATH/TO/CAKE", | |
"cake_version" => "cakephp1.3", | |
"plugin_dir" => "plugins", | |
"servers" => { | |
"prod" => { | |
"server" => "APPLICATION.TLD", |
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 BSN according to http://nl.wikipedia.org/wiki/Burgerservicenummer */ | |
private boolean isValidBSN(int candidate) { | |
if (candidate <= 9999999 || candidate > 999999999) { | |
return false; | |
} | |
int sum = -1 * candidate % 10; | |
for (int multiplier = 2; candidate > 0; multiplier++) { | |
int val = (candidate /= 10) % 10; | |
sum += multiplier * val; |
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
Dial Chart examples. Suggestions and enhancements are welcome. |
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 | |
if (!isset($modules)) { | |
$modulus = 11; | |
} | |
if (!isset($model)) { | |
$models = ClassRegistry::keys(); | |
$model = Inflector::camelize(current($models)); | |
} | |
?> | |
<div class="pagination"> |
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
import mapnik | |
import cairo | |
m = mapnik.Map(15000, 15000, "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs") # end result: OpenStreetMap projection | |
m.background = mapnik.Color(0, 0, 0, 0) | |
bbox = mapnik.Envelope(-10000000, 2000000, -4000000, -19000000) # must be adjusted | |
m.zoom_to_box(bbox) | |
s = mapnik.Style() |
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
This playbook has been removed as it is now very outdated. |
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
#!/usr/bin/env python | |
import os | |
import urllib2 | |
import json | |
import subprocess | |
user=None | |
repo=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
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc | |
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/ | |
// author: Pawel Kozlowski | |
var myApp = angular.module('myApp', []); | |
//service style, probably the simplest one | |
myApp.service('helloWorldFromService', function() { | |
this.sayHello = function() { | |
return "Hello, World!" |
OlderNewer