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 / screen-fader.sh
Created October 12, 2016 14:41
Fading out notifier for screen saver
#!/bin/bash
SEC=10
[ $# -eq 1 ] && SEC=$1
FRAMES=100
SLEEP=`echo $SEC / $FRAMES | bc -l`
trap "xcalib -clear" EXIT
sleep 0.1
@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 / hacker-news-new-comment-marker.user.js
Last active April 14, 2016 00:20
Hacker News: New Comment Marker
// ==UserScript==
// @name Hacker News: New Comment Marker
// @description Make "new" comments since your last visit especially visible
// @downloadURL https://gist.github.com/noscript/b0420686256ab961e4e3f668bf9f1f5b/raw/hacker-news-new-comment-marker.user.js
// @namespace https://gist.github.com/noscript
// @version 2
// @include https://news.ycombinator.com/item?id=*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
// ==/UserScript==
@noscript
noscript / GM.office365.outlook.user.js
Last active August 1, 2018 15:17
Greasemonkey Office365 Outlook unread count in favicon and tab title
// ==UserScript==
// @name Office365 Outlook unread count in favicon and tab title
// @namespace http://userscripts.org/scripts/
// @description Update the favicon and tab title to indicate the number of unread messages in the Inbox, so you can pin your tab and still see when you have new mail. Adapted from http://userscripts.org/scripts/show/155379
// @version 2.2
// @include https://outlook.office365.com/owa/*
// @include https://outlook.office.com/owa/*
// @grant none
// ==/UserScript==
@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.
@noscript
noscript / nautilus-folders-first.sh
Created February 10, 2015 14:03
Shortcut to show folders first in Nautilus
#!/bin/bash
# Version: Sun Sep 8 2013
OLD_VALUE=
LSB_RELEASE=$(lsb_release -sr)
if [ $LSB_RELEASE \< '12.04' ]; then
OLD_VALUE=$(gconftool --get /apps/nautilus/preferences/sort_directories_first)
else
@noscript
noscript / dpkg-since.py
Last active March 22, 2020 17:11
Dpkg Time Machine
#!/usr/bin/env python3
# file: dpkg-since.py
# description: lists installed packages since the specified date
# changelog:
# * Feb 10 2015 - init release
# * Mar 24 2015 - new: packages sorted by installation time/date
# fix: ignored TIME argument
# * Apr 9 2015 - fix: exclude duplicates
@noscript
noscript / screen.png
Created October 11, 2012 12:49
Indent guides: new `g:indent_guides_soft_pattern` option
screen.png
@noscript
noscript / indent-guides-mode.png
Created October 8, 2012 11:19
Indent guides feature request: highlights coveting the text
indent-guides-mode.png