Skip to content

Instantly share code, notes, and snippets.

View jerone's full-sized avatar

Jeroen van Warmerdam jerone

View GitHub Profile
@jerone
jerone / ClipboardFusionHelper.cs
Created February 3, 2014 22:47
ClipboardFusion Marco WinForm Test
using System;
using System.Windows.Forms;
using System.Drawing;
using System.Collections.Generic;
public static class ClipboardFusionHelper
{
private static String Truncate(String text, Int32 count=1)
{
if (count > 0 && text.Length > count)
@jerone
jerone / OpenUserJS.org_Export_Cert.user.js
Created March 3, 2014 21:40
OpenUserJS.org Export Cert
// ==UserScript==
// @name OpenUserJS.org Export Cert
// @namespace http://OpenUserJS.org
// @homepageUrl http://OpenUserJS.org
// @include http://userscripts.org/home/scripts
// @version 1
// @grant GM_openInTab
// ==/UserScript==
(function () {
var userId = document.evaluate('//li[@class="menu"]/a[text()[contains(.,"public profile")]]', document, null, 9, null) .singleNodeValue.href.match(/(\d+)/) [0];
// ==UserScript==
// @name GreaseMonkey issue #1890
// @namespace https://github.com/greasemonkey/greasemonkey/issues/1890
// @include https://github.com/jerone?tab=activity
// @version 1
// @grant none
// ==/UserScript==
alert('test');
@jerone
jerone / gist:9723502
Created March 23, 2014 14:06
Transitions for jQuery pjax
$(document).on('pjax:start', function() {
$(this).find('[data-pjax-container]').fadeOut();
}).on('pjax:end', function() {
$(this).find('[data-pjax-container]').fadeIn();
});
@jerone
jerone / 163703.user.js
Last active August 29, 2015 13:57
Update for Twitter navigation problem
// ==UserScript==
// @name Hide replies on Twitter user account
// @namespace http://userscripts.org/scripts/show/163703
// @description Hide replies on Twitter user account
// @include *//twitter.com/*
// @exclude *//twitter.com/
// @exclude *//twitter.com
// @version 4
// @grant none
// ==/UserScript==
// ==UserScript==
// @name Horizon TV issue
// @namespace https://github.com/jerone/UserScripts/
// @include *horizon.tv*
// @version 1
// @grant none
// ==/UserScript==
(function HorizonTVFixer() {
@jerone
jerone / gist:85ea9f9a4dfa3496a963
Created December 7, 2014 14:31
Override markdown button to support code blocks
//$.fn.markdown.defaults.buttons[0][2].data[2]
var cmdBold, cmdItalic, cmdCode;
$.fn.markdown.defaults.buttons[0].forEach(function(group) {
group.data.forEach(function(button) {
if (button.name === 'cmdBold') cmdBold = button;
else if (button.name === 'cmdItalic') cmdItalic = button;
else if (button.name === 'cmdCode') cmdCode = button;
});
});
// Override `cmdCode` button;
{
"webexe_settings": {
"linux-x32": false,
"windows-x64": true,
"download_dir": "C:\\\\Users\\\\jerone\\\\Desktop\\\\Web2ExeWin\\\\files\\\\downloads",
"nw_compression_level": 5,
"mac-x32": false,
"windows-x32": false,
"mac-x64": false,
"nw_version": "0.12.0-rc1",
@jerone
jerone / test-grant-GM.user.js
Last active August 29, 2015 14:18
Hook into jQuery existing events
// ==UserScript==
// @name test @grant GM_*
// @namespace https://github.com/jerone/UserScripts
// @include https://github.com/*
// @version 1
// @grant GM_setValue
// ==/UserScript==
unsafeWindow.$(document).on("pjax:end", exportFunction(function() {
console.log('test @grant GM_* 1');
@jerone
jerone / snippet.js
Created July 25, 2015 15:40
Atom get repo statusses snippet
var GitUtils = require('git-utils');
var repo = GitUtils.open(atom.project.getPaths()[0]);
console.log(repo.getStatus());