Skip to content

Instantly share code, notes, and snippets.

View Naatan's full-sized avatar

Nathan Rijksen Naatan

View GitHub Profile
@neurobashing
neurobashing / gist:6937584
Created October 11, 2013 16:13
Open the current selection in Dash
var langs = {
JavaScript: "js:",
Python: "py:",
'Node.js': "node:"
}
komodo.assertMacroVersion(3);
if (komodo.view) { komodo.view.setFocus(); }
var thislang = ko.views.manager.currentView.koDoc.language
var selection = ko.views.manager.currentView.scimoz.selText
@alganet
alganet / autoloader.php
Created May 10, 2011 14:18
Lightweight PSR-0 compliant autoloader
<?php
spl_autoload_register(function ($className) {
$fileParts = explode('\\', ltrim($className, '\\'));
if (false !== strpos(end($fileParts), '_'))
array_splice($fileParts, -1, 1, explode('_', current($fileParts)));
require implode(DIRECTORY_SEPARATOR, $fileParts) . '.php';
});