Skip to content

Instantly share code, notes, and snippets.

View bradleybossard's full-sized avatar

Bradley Bossard bradleybossard

View GitHub Profile
@bradleybossard
bradleybossard / github-sy
Created January 29, 2016 22:48
Fix issue with Github default 1 tab = 8 spaces
/***
By default, Github uses 8 spaces for each tab, which makes code and diffs harder to read b/c long code wraps faster.
Install the Stylish Chrome Extension which injects custom CSS into a page based on url
https://chrome.google.com/webstore/detail/stylish/fjnbnpbmkenffdnngjfgmeleoegfcffe
then navigate to Github and add the following CSS style to convert 8 spaces to 2
.blob-code {
@bradleybossard
bradleybossard / gist:51cae268676df4261091
Last active May 7, 2020 02:44
Fix for CenturyLink technicolor C2100T modem bug.
/*
Some bad jQuery will not let you rename devices on the Modem Status -> Device Table page. Each time I try to change the device in the drop-down,
it keeps changing to the first in the list.
Copy the line below and run it in the console on the page. You will need to change the integer var num = to whatever selection you want
*/
var num = 2; refreshTime=100000;$('select[name=lan_device] option:eq(' + num + ')').attr('selected', 'selected');
@bradleybossard
bradleybossard / removeSshKeyDirectory
Created December 9, 2015 03:18
Remove all SSH keys from Javascript SSH
javascript: term_.command.removeDirectory('/.ssh/');
@bradleybossard
bradleybossard / Remove all known hosts from Javascript SSH
Created December 9, 2015 02:55
The bookmark can be used to remove all the known hosts when using the Javascript console emulator
javascript: term_.command.removeAllKnownHosts();
@bradleybossard
bradleybossard / titleUrlMarkdownClip.js
Created December 5, 2015 21:09
Bookmarklet to copy current page title and url in Markdown format to clipboard, like [title](url) - Usual for posting links to resources in README.md files
javascript:(function() {
function copyToClipboard(text) {
if (window.clipboardData && window.clipboardData.setData) {
/*IE specific code path to prevent textarea being shown while dialog is visible.*/
return clipboardData.setData("Text", text);
} else if (document.queryCommandSupported && document.queryCommandSupported("copy")) {
var textarea = document.createElement("textarea");
textarea.textContent = text;
@bradleybossard
bradleybossard / dabblet.css
Created November 27, 2013 23:26
Attempt for Chrome-style progress-indicator with SVG and CSS animations
/**
* Attempt for Chrome-style progress-indicator with SVG and CSS animations
*/
@keyframes spin {
to {
stroke-dashoffset: -264;
}
}
@bradleybossard
bradleybossard / dabblet.css
Created November 27, 2013 23:26 — forked from anonymous/dabblet.css
Attempt for Chrome-style progress-indicator with SVG and CSS animations
/**
* Attempt for Chrome-style progress-indicator with SVG and CSS animations
*/
@keyframes spin {
to {
stroke-dashoffset: -264;
}
}
@bradleybossard
bradleybossard / dabblet.css
Created November 26, 2013 01:13 — forked from anonymous/dabblet.css
Animate a Hilbert Curve
/**
* Animate a Hilbert Curve
*/
@keyframes spin {
0% {
stroke: #00aeef
}
37.5% {
stroke: #ed1c24;
@bradleybossard
bradleybossard / dabblet.css
Created November 26, 2013 01:13 — forked from anonymous/dabblet.css
Attempt for Chrome-style progress-indicator with SVG and CSS animations
/**
* Attempt for Chrome-style progress-indicator with SVG and CSS animations
*/
@keyframes spin {
to {
stroke-dashoffset: -264;
}
}