Skip to content

Instantly share code, notes, and snippets.

View Ikke's full-sized avatar

Kevin Daudt Ikke

  • Netherlands
  • 09:33 (UTC +02:00)
View GitHub Profile
def foo(bar)
#Hoe moet je IDE nu weten wat voor type bar is?
end
@Ikke
Ikke / gist:2428988
Created April 20, 2012 14:12
Set object
var Set = function() {
this.items = {};
this.add = function(key) {
this.items[key] = true;
}
this.exists = function(key) {
return this.items.hasOwnProperty(key);
}
this.as_array = function() {
var keys = [];
@Ikke
Ikke / gist:2508506
Created April 27, 2012 11:24
phpdoc type hinting
<?php
/** @var Model_Test foo */
$foo = Model::factory('test')
@Ikke
Ikke / gist:2988389
Created June 25, 2012 12:49
Git test branch workflow
* 662f884 (HEAD, master) Merge branch 'upstream'
|\
| * 546d817 (upstream) Merging feature C
| |\
| * \ ccd36df Merging feature B
| |\ \
| * | | 0b57665 Upstream work
* | | | 657fc39 Merging feature C
|\ \ \ \
| | |_|/
* b48474b (HEAD, integration) Merging feature C
|\
* \ 959996b Merging feature B
|\ \
| | | * 546d817 (upstream) Merging feature C
| | | |\
| | | |/
| | |/|
| | * | e096804 (feature/C) Feature C
| |/ /
* b48474b (integration) Merging feature C
|\
* \ 959996b Merging feature B
|\ \
| | | * 546d817 (HEAD, upstream, master) Merging feature C
| | | |\
| | | |/
| | |/|
| | * | e096804 (feature/C) Feature C
| |/ /
* 546d817 (HEAD, upstream, master) Merging feature C
|\
| * e096804 (feature/C) Feature C
* | ccd36df Merging feature B
|\ \
| * | e5085f5 (feature/B) Add feature B
| |/
* | 0b57665 Upstream work
|/
* 7db78f1 initial commit
@Ikke
Ikke / gist:3357263
Created August 15, 2012 07:01
Git 1.7.8 release note
When populating a new submodule directory with "git submodule init",
the $GIT_DIR metainformation directory for submodules is created inside
$GIT_DIR/modules/<name>/ directory of the superproject and referenced
via the gitfile mechanism. This is to make it possible to switch
between commits in the superproject that has and does not have the
submodule in the tree without re-cloning.
>>> def test():
... return (1, 2, 3)
...
>>> a = test()
>>> print(a)
(1, 2, 3)
>>> a, b, c = test()
>>> print(a)
1
Route::set('bar', '/bar')
->defaults(array(
'directory' => 'foo',
'controller' => 'bar',
'action' => 'index',
));
//Controller should be called Controller_Foo_Bar in directory /controller/foo/bar.php