Skip to content

Instantly share code, notes, and snippets.

Avatar

Jeroen van Warmerdam jerone

  • @CT-Energy
  • The Netherlands
  • Twitter @jeronevw
View GitHub Profile
@jerone
jerone / snippet.js
Created Jul 25, 2015
Atom get repo statusses snippet
View snippet.js
var GitUtils = require('git-utils');
var repo = GitUtils.open(atom.project.getPaths()[0]);
console.log(repo.getStatus());
@jerone
jerone / test-grant-GM.user.js
Last active Aug 29, 2015
Hook into jQuery existing events
View test-grant-GM.user.js
// ==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');
View package.json
{
"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 / gist:85ea9f9a4dfa3496a963
Created Dec 7, 2014
Override markdown button to support code blocks
View gist:85ea9f9a4dfa3496a963
//$.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;
View horizon.user.js
// ==UserScript==
// @name Horizon TV issue
// @namespace https://github.com/jerone/UserScripts/
// @include *horizon.tv*
// @version 1
// @grant none
// ==/UserScript==
(function HorizonTVFixer() {
@jerone
jerone / WE-Markdown.css
Last active Jan 12, 2022
Github Flavored Markdown Stylesheet for Web Essentials
View WE-Markdown.css
html {
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
font-family: sans-serif;
}
body {
margin: 0;
padding: 30px;
min-width: 1020px;
@jerone
jerone / 163703.user.js
Last active Aug 29, 2015
Update for Twitter navigation problem
View 163703.user.js
// ==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==
@jerone
jerone / gist:9723502
Created Mar 23, 2014
Transitions for jQuery pjax
View gist:9723502
$(document).on('pjax:start', function() {
$(this).find('[data-pjax-container]').fadeOut();
}).on('pjax:end', function() {
$(this).find('[data-pjax-container]').fadeIn();
});
View test.user.js
// ==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');
View OpenUserJS.org_Export_Cert.user.js
// ==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];