This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
echo "gem: --no-ri --no-rdoc" >> ~/.gemrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
ECLIPSE_VERSION=46 | |
ECLIPSE_HOME= ## path to the jar referenced in the next line ## | |
ECLIPSE_CMDLINE_MATCH="jar ${ECLIPSE_HOME}/plugins/org.eclipse.equinox.launcher" | |
# This just leaves an orphan | |
killall eclipse${ECLIPSE_VERSION} 2> /dev/null | |
# This still just leaves an orphan | |
killall eclipse 2> /dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Array.from( | |
document.querySelectorAll('div.J-N') | |
).filter( | |
function(option) { | |
return option.attributes.cfg && option.attributes.cfg.nodeValue.indexOf("^all,") != -1; | |
} | |
).forEach( | |
function(option) { | |
option.attributes.cfg.nodeValue = option.attributes.cfg.nodeValue.replace("^all","^u"); | |
option.firstChild.innerText = option.firstChild.innerText + " and unread"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
const mySearchEngines = | |
{ | |
'domain': SEARCH_DOMAIN, | |
'engines': [ | |
{ | |
'keyword': 'maps.google.com', | |
'name': 'Maps', | |
'url': 'https://www.google.com/maps/search/%s', | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function _buildFontSwitcher({document, fontFunc, selectors = [], aliases = [], bangImportant = false}) { | |
// This is basically a closure around a style tag. | |
// build that style tag. | |
const el = document.createElement("style"); | |
document.head.appendChild(el); | |
const _buildAlias = (fn, an) => ` | |
@font-face { | |
font-family: ${an}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
const regrep = require('stream-replace'); | |
/* Stream in, stream out. | |
The output will look something like this: | |
{ "${code_0}": ["${hex^0_0}", ..., "${hex^0_n}"], | |
"${code_1}": [...], | |
.... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
M104 S0 ;extruder heater off | |
G91 ;relative positioning | |
G1 E-1 F300 ;retract the filament ... to release some of the pressure. | |
G1 Z+5 E-1 F{travel_speed} ;move Z up a bit and retract filament /just/ a little more. | |
G90 ;absolute positioning | |
G0 X0 Y110 ; Present the result! | |
M84 ;steppers off | |
M106 S0 ; Fan off. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
PACKAGE_LIST="dpkg-query -W -f='${binary:Package}\n'" # List all debs | |
#PACKAGE_LIST=apt-mark showmanual # List only requested/manually installed debs | |
# Unknown origin debs get 100. | |
#PRIORITY=100 | |
# I have some preferences to set some repos to other priorities in (100-200) | |
PRIORITY="1.." | |
$PACKAGE_LIST | \ | |
xargs apt-cache policy | \ | |
grep -B 4 " \*\*\*.*${PRIORITY}$" | \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Wikipedia: embed midi | |
// @namespace mqScripts | |
// @match *://*.wikipedia.org/* | |
// @grant none | |
// @require https://code.jquery.com/jquery-3.3.1.slim.min.js | |
// ==/UserScript== | |
// Requires that your browser knows what to do with midi audio tags. | |
// eg MIDI Player https://chrome.google.com/webstore/detail/midi-player/khppfbnjbaampmeeiocjhcodkklkcfjf | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Good stuff here: https://wiki.openwrt.org/toh/tp-link/tl-wdr4300 | |
# (p3,5,7,9 on JTAG are GPIOs?) | |
J1: 1,2,3 (not 4) -> raspi: 10,8,6 | |
minicom -D /dev/ttyAMA0 -b 115200 | |
type: 'tpl<enter>' when uboot is preparing to load | |
# server should be 192.168.1.100 | |
# see that with printenv |
OlderNewer