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
## Sample Propel configuration file ## | |
# NOTE: Some proposed structure | |
## General settings ## | |
general: | |
# The name of your project. | |
# This affects names of generated files, etc. | |
project: | |
version: 2.0.0-dev |
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
$jit.ST.Label.Native = new Class({ | |
Implements: Graph.Label.Native, | |
renderLabel: function(canvas, node, controller) { | |
var ctx = canvas.getCtx(), | |
coord = node.pos.getc(true), | |
height = 0, maxHeight, lineHeight, restText, testLastLine, textSplit, | |
width = node.getData("width"), modifyLastLine = false, lines, i, len, y; | |
if (!canvas.viz.config.Node.autoWidth && ctx.measureText(node.name).width > width) { |
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
// Method 1: | |
MyClass = Class({ | |
extends : "AnotherClass", | |
mixins : ["Event"], | |
construct : function () { | |
console.log("constructor message"); | |
}, | |
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 is about storing php listeners in a database. | |
Listeners are typically stored on objects waiting for an event using the Observer design pattern. Looks like this: | |
$myListener = new MyListener(); | |
$myRecord->addlistener($myListener); | |
// or | |
$myRecord->addListener('event.created', $myListener); | |
From my point of view, the listener parameter of the addListener method could handle 4 different types of listeners: |
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> | |
<html> | |
<head> | |
<title>JS.Class loader</title> | |
<script type="text/javascript">JSCLASS_PATH = 'lib/jsclass-3.0.4/min'</script> | |
<script type="text/javascript" src="lib/jsclass-3.0.4/min/loader-browser.js"></script> | |
</head> | |
<body> | |
<script type="text/javascript"> | |
JS.require('JS.Class', function() { |
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 setPixel(x, y) { | |
console.log("Pixel auf %s/%s", x, y); | |
} | |
function bresenham(start, end) { | |
var dx = end.x - start.y, | |
dy = end.y - start.y, | |
x = start.x, | |
y = start.y, | |
err = dx / 2; |
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 Animations (auto values) | |
*/ | |
#anim { | |
border: 1px solid; | |
padding: 3px; | |
background-color: green; | |
color: white; | |
width: auto; | |
transition: width 1s; |
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 Stub extends AbstractApp { | |
public function run(Request $req) { | |
$router = new ModuleActionRouter('stub', $this->appRouter->getPrefix()); | |
$route = $router->match($this->appRouter->getDestination()); | |
$main = ''; | |
try { | |
$moduleManager = new ModuleManager($this->classLoader); |
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-variables | |
*/ | |
:root { | |
var-bg: red; | |
} | |
div { | |
margin: 20px; |
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/sh | |
########################### | |
## Shell script to clone a list of github repositories and run `mvn clean install` on each one of them | |
## | |
## Authors: Robert Gründler, Thomas Gossmann | |
## Usage: put a file called `repos.txt` in the folder of the script containing the repository URLs, line by line: | |
## | |
## https://github.com/pulse00/Composer-Eclipse-Plugin.git | |
## git@github.com:pulse00/Symfony-2-Eclipse-Plugin.git |
OlderNewer