Skip to content

Instantly share code, notes, and snippets.

View Naatan's full-sized avatar

Nathan Rijksen Naatan

View GitHub Profile
@Naatan
Naatan / disable-reddit-lightbox.userscript.js
Created April 28, 2019 15:23
Disable Reddit Redesign Lightbox (tested on Tampermonkey - Safari)
// ==UserScript==
// @name Disable Reddit Lightbox
// @namespace http://naatan.com/
// @version 0.1
// @description Disable the damn lightbox on the reddit redesign
// @author Nathan Rijksen
// @match https://www.reddit.com/*
// @grant none
// ==/UserScript==
@Naatan
Naatan / fix.github.sidebar.userscript.js
Last active December 8, 2016 16:22
Fix github sidebar
// ==UserScript==
// @name Fix github sidebar
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Fix github's horrible sidebar "improvements"
// @author Naatan
// @match https://github.com/Komodo/KomodoEdit/issues/*
// @grant none
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
// ==/UserScript==
@Naatan
Naatan / highlightword.js
Created March 6, 2015 15:54
Komodo Macro: Quick Find / Highlight
/**
* Original macro: http://community.activestate.com/forum/macro-quick-find-highlight
* Forked to fix API's for Komodo 7 and beyond
*
* Copyright (c) 2009 Stan Angeloff http://blog.angeloff.name
*
* 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,
@Naatan
Naatan / SCC - Open on GitHub.js
Last active August 29, 2015 14:14
Komodo Macro - Open current file location on github
var notify = require("notify/notify");
var editor = require("ko/editor");
/* Quickly thrown together, only supports Komodo 9 and GitHub */
var koDoc = ko.views.manager.currentView.koDoc;
if ( ! koDoc || ! koDoc.file) return;
var uri = koDoc.file.URI;
var sccSvc = ko.scc.getServiceForUrl(uri);
@Naatan
Naatan / vertical-tabs.js
Created June 18, 2014 15:47
Old Komodo Vertical Tabs Macro
var view = ko.views.manager.currentView;
var tabbox = view.parentNode;
while (tabbox && tabbox.nodeName != "tabbox" && tabbox.nodeName != "xul:tabbox") {
tabbox = tabbox.parentNode;
}
// Vertical tabs
tabbox.setAttribute("orient", "horizontal");
tabbox.setAttribute("dir", "reverse");
tabbox.tabs.setAttribute("orient", "vertical");
@Naatan
Naatan / Select_Brace_Contents.js
Created June 2, 2014 16:54
Select Brace Contents
(function() {
var sm = ko.views.manager.currentView.scimoz;
function selBraceContents()
{
ko.commands.doCommand('cmd_selectToMatchingBrace');
var selText = sm.selText;
@Naatan
Naatan / auto-braces.js
Created May 7, 2014 17:39
Komodo IDE - Auto Braces
/**
* @fileoverview Auto completes curly braces to start on a new line - experimental
* @author Nathan Rijksen
* @version 0.1
*/
/**
* Komodo Extensions Namespace.
* This namespace was suggested by JeffG. More information is available at:
* {@link http://community.activestate.com/forum-topic/extension-s-namespace}
var tmp = require('tmp');
var fs = require('fs');
var exec = require("child_process").exec;
tmp.file({postfix: ".md"}, function(err, path, fd) {
fs.writeFile(path, "* One\n* Two", function(err) {
if(err) return;
exec('github-markup ' + path, function (err, stdout, stderr) {
console.log(stdout);
console.log(path);
@Naatan
Naatan / gist:9231578
Created February 26, 2014 15:26
Komodo IDE - Open Files Pattern for Komodo Development
ko.openfiles.groupers.byPattern.patterns = [
{
name: 'Plat - %match% - config',
pattern: /\/skin\/plat\/([a-z0-9_-]*)\/_config\//i
},
{
name: 'Plat - %match%',
pattern: /\/skin\/plat\/([a-z0-9_-]*)\//i
},
{
@Naatan
Naatan / gist:9231532
Created February 26, 2014 15:25
Komodo IDE - Open Files Pattern for DocPad
ko.openfiles.groupers.byPattern.patterns = [
{
name: 'Databases',
pattern: /\/databases(?:\/|$)/i
},
{
name: 'Scripts',
pattern: /\/scripts(?:\/|$)/i
},
{