Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View bramus's full-sized avatar

Bramus bramus

View GitHub Profile

Keybase proof

I hereby claim:

  • I am bramus on github.
  • I am bramus (https://keybase.io/bramus) on keybase.
  • I have a public key whose fingerprint is 4DE2 5A54 D217 D318 C448 AD5E BCA6 D920 A543 86D7

To claim this, I am signing this object:

@bramus
bramus / JavaCompileAndRun.sublime-build
Created September 23, 2014 18:15
Sublime Text Build System to compile and successively run a java source file.
// Installation: In Sublime select "Tools" > "Build System" > "New" and paste the contents of this gist in a file named `JavaCompileAndRun.sublime-build`
// Usage: In Sublime text select "Tools" > "Build System" > "JavaCompileAndRun". Hit CMD + B to execute it.
// @note: untested on Windows (but should work)
{
"windows": {
"shell": true,
"cmd": [
"javac", "$file", "&;",
"java", "$file_base_name"
@bramus
bramus / index.php
Created October 10, 2014 13:22
PHP Exception Typehinting
<?php
class DummyException extends Exception {
// ...
}
class Dummy {
public function __construct() {
throw new Exception('...');
}
@bramus
bramus / nmap.md
Last active August 29, 2015 14:07
Belgian banks vs. POODLE

(state at 2014-10-16)

Belfius

(SSL Labs Test: A-)

$ nmap --script +ssl-enum-ciphers -p443 www.belfius.be

Starting Nmap 6.40 ( http://nmap.org ) at 2014-10-16 21:18 CEST
Nmap scan report for www.belfius.be (212.63.233.37)
@bramus
bramus / log1.crash
Created November 21, 2014 10:10
Last.fm 2.1.36 OS X Yosemite Crash Log
Process: Last.fm Scrobbler [793]
Path: /Applications/Last.fm.app/Contents/MacOS/Last.fm Scrobbler
Identifier: fm.last.Scrobbler
Version: 2.1.36
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Last.fm Scrobbler [793]
User ID: 501
Date/Time: 2014-10-23 00:30:33.816 +0200
<?php
namespace Psr\Router;
/**
* Describes a router instance
*
* ...
*/
interface RouterInterface
@bramus
bramus / instructions.md
Created February 9, 2015 21:02
Wampserver Virtual Vhosts

To make websites placed in C:\wamp\www\bramus.vandamme\labo01\public_html also available via http://labo01.bramus.vandamme.127.0.0.1.xip.io/ (next to http://localhost/bramus.vandamme/labo01/public_html) via Wampserver, follow these steps:

  1. Open C:\wamp\bin\apache\apache2.4.9\conf\httpd.conf and remove the # before the line that reads #IncludeOptional "c:/wamp/vhosts/*"
  2. Create the file C:\wamp\vhosts\students.conf (see other file attached to this gist)
  3. Restart wampserver.
@bramus
bramus / todos.json
Created March 9, 2015 08:13
Todolist
var todos = [
{
"id": 1,
"what": "A very urgent task",
"priority": "high",
"added_on": "2012-12-03 13:56:08",
"links": [
{
"rel": "self",
"href": "\/todos\/1"
@bramus
bramus / speedtest.txt
Created May 18, 2015 15:06
Speedtest 18/05/2015 17:05:00
mini:~ bramus$ speedtest-cli
Retrieving speedtest.net configuration...
Retrieving speedtest.net server list...
Testing from Telenet N.V. (178.119.x.y)...
Selecting best server based on latency...
Hosted by TreudlerGroup France (Roubaix) [30.77 km]: 24.839 ms
Testing download speed........................................
Download: 31.28 Mbits/s
Testing upload speed..................................................
Upload: 11.04 Mbits/s
@bramus
bramus / mq-allow-external-clone.js
Last active September 8, 2015 20:41 — forked from amatiasq/mq-allow-external-clone.js
Directive to allow 3rd party libraries to clone angular nodes.
angular.module('my-module')
.directive('mqAllowExternalClone', function($compile) {
return {
link: link,
};
function link(scope, elem, attr) {
var element = elem[0];
var original = element.cloneNode;
element.cloneNode = patch;