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 | |
/** | |
* @author: Frederic G. MARAND <[email protected]> | |
* | |
* @copyright (c) 2013 Ouest Systèmes Informatiques (OSInet). | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
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 | |
use Doctrine\Common\Annotations\AnnotationReader; | |
use Doctrine\Common\Annotations\AnnotationRegistry; | |
$src = __DIR__ . '/../src'; | |
$vendors = __DIR__ . '/../vendor'; | |
require_once "$vendors/autoload.php"; | |
class Loader { |
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 | |
/** | |
* @file | |
* gvdump.php | |
* | |
* @author: Frédéric G. MARAND <[email protected]> | |
* | |
* @copyright (c) 2014 Ouest Systèmes Informatiques (OSInet). | |
* | |
* @license MIT |
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
// A solution to https://www.freelancer.com/projects/Google-Go/downloads-the-contents-com-Sees.html | |
package main | |
import ( | |
"container/list" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"net/http" | |
"os" |
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
// Inspired by http://talks.golang.org/2014/go4java.slide#23 | |
package main | |
import "github.com/davecgh/go-spew/spew" | |
type Person struct { | |
name string | |
} |
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 Person { | |
public $name; | |
public function __construct($name) { | |
$this->name = $name; | |
} | |
public function getName() { |
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 Person { | |
public $name; | |
public function __construct($name) { | |
$this->name = $name; | |
} | |
public static function getName(Person $p = NULL) { |
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
package main | |
import ( | |
"net/http" | |
"fmt" | |
) | |
func main() { | |
mux := http.NewServeMux() |
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
// From 1.1.03 packages/tinytest/tinytest.js | |
test._stringEqual(actual, expected, message) // Source comment: EXPERIMENTAL nicer (multiline) string display in runner | |
test.equal(actual, expected, message, not) // Source comment: "XXX eliminate 'message' and 'not' arguments" | |
/* Call this to fail the test with an exception. Use this to record exceptions | |
* that occur inside asynchronous callbacks in tests. It should only be used | |
* with asynchronous tests, and if you call this function, you should make | |
* sure that | |
* (1) the test doesn't call its callback (onComplete function); | |
* (2) the test function doesn't directly raise an exception. | |
*/ |
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/bash | |
# Build a commit frequency list. | |
ROW_LIMIT=20 | |
git log --name-status $* | \ | |
grep -E '^[A-Z]\s+' | \ | |
cut -c3-500 | \ | |
sort | \ | |
uniq -c | \ |
OlderNewer