Skip to content

Instantly share code, notes, and snippets.

@noscript
noscript / gists.js
Last active October 15, 2016 22:35 — forked from JeanSebTr/gists.js
Async load of Github's gists without jquery in 31 lines of code
(function(){
var gists = document.getElementsByTagName('gist');
function embed(id, file, i, tag) {
window['embed_gist_' + i] = function(gist) {
var div = document.createElement('div');
div.innerHTML = gist.div;
tag.parentNode.replaceChild(div.firstChild, tag);
var css = document.createElement('link');
css.rel = 'stylesheet';
@noscript
noscript / SoundCloudHideReposts.user.js
Last active April 13, 2017 14:33 — forked from zaphodddd/SoundCloudHideReposts0.2.user.js
SoundCloudHideReposts - for GreaseMonkey / TamperMonkey - Hide reposts from your soundcloud stream - Nov 2015
// ==UserScript==
// @name Soundcloud hide reposts
// @namespace https://gist.github.com/noscript
// @downloadURL https://gist.github.com/noscript/c4c78aa505b89f2618e43272054a6737/raw/SoundCloudHideReposts.user.js
// @version 1.1
// @description hides reposts in stream
// @match http://soundcloud.com/stream
// @match https://soundcloud.com/stream
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
// @copyright 2013, Upated 2015, Forked 2016
@noscript
noscript / i915_317.patch
Last active November 9, 2015 13:12
i195 VGA arbitration patch for 3.16.0.4 in Debian 8.2 Jessie
diff -rupN linux-3.16.7-ckt11.old/drivers/gpu/drm/i915/i915_dma.c linux-3.16.7-ckt11/drivers/gpu/drm/i915/i915_dma.c
--- linux-3.16.7-ckt11.old/drivers/gpu/drm/i915/i915_dma.c 2014-10-05 17:23:04.000000000 -0200
+++ linux-3.16.7-ckt11/drivers/gpu/drm/i915/i915_dma.c 2014-10-08 13:25:35.261920170 -0200
@@ -1316,10 +1316,20 @@ static int i915_load_modeset_init(struct
* If we are a secondary display controller (!PCI_DISPLAY_CLASS_VGA),
* then we do not take part in VGA arbitration and the
* vga_client_register() fails with -ENODEV.
+ *
+ * NB. The set_decode callback here actually only works on GMCH
+ * devices, on newer HD devices we can only disable VGA MMIO space.