This file contains hidden or 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 uuid() { | |
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { | |
var r = Math.random() * 16 | 0, v = c === 'x' ? r : (r & 0x3 | 0x8); | |
return v.toString(16); | |
}); | |
}; |
This file contains hidden or 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
/** | |
* To install: | |
* 1. Right click on bookmark bar | |
* 2. Click 'Add Page' | |
* 3. Give it a title | |
* 4. Paste the below into the 'URL' field | |
* 5. Save | |
* | |
* To use: | |
* 1. Navigate to your user page on GitHub, like https://github.com/dannyid |
This file contains hidden or 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
/** | |
1. Right click on bookmark bar | |
2. Click 'Add Page' | |
3. Give it a title | |
4. Paste the below into the 'URL' field | |
5. Save | |
**/ | |
javascript:window.location = (function() { | |
var urlParts = window.location.pathname.split('/').slice(1); |
This file contains hidden or 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
/** | |
1. Right click on bookmark bar | |
2. Click 'Add Page' | |
3. Give it a title | |
4. Paste the below into the 'URL' field | |
5. Save | |
**/ | |
javascript: (function() { | |
var e = document.getElementById("colorblind-styling"); |
This file contains hidden or 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
setInterval(displayTime, 1000); | |
function displayTime() { | |
var date = new Date(); | |
var h = date.getHours().toString(2); | |
var m = date.getMinutes().toString(2); | |
var s = date.getSeconds().toString(2); | |
h = fillStringLength(h, 5, '0'); | |
m = fillStringLength(m, 6, '0'); |
This file contains hidden or 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
/* | |
http://colloquy.info/project/wiki/Development/Styles/CSS | |
*/ | |
/* Style based on Bland theme */ | |
body { | |
} | |
.envelope { |
This file contains hidden or 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
// The player | |
var player = netflix.cadmium.objects.videoPlayer(); | |
// Metadata about current episode -- ID and url to get frame at a specific time | |
var episodeId = netflix.cadmium.metadata.getActiveVideo().episodeId; | |
var imgRoot = netflix.cadmium.metadata.getActiveVideo().progressImageRoot; | |
// Generates URL of preview image for given timestamp | |
function getFrame(timestamp) { | |
var t = Math.floor(timestamp/10000).toString(10); |
This file contains hidden or 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
var ncr = require('nodecr') | |
, request = require('request') | |
, fs = require('fs') | |
, test_img = 'https://www.google.com/images/srpr/logo3w.png' // Change this to your image | |
// Create image name from end of URL. | |
// Note this will fail in loads of cases. | |
var imgName = test_img.split('/').pop() | |
// Process the image and read the text from it using Tesseract |
This file contains hidden or 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
In terminal run: | |
defaults write -g ApplePressAndHoldEnabled -bool false | |
To turn back on: | |
defaults write -g ApplePressAndHoldEnabled -bool true | |
This file contains hidden or 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
1. Remap Caps Lock to Control in the Keyboard preference pane (Modifier Keys button). | |
2. In Karabiner, check "Control_L to Control_L (+ When you type Control_L only, send Escape)". | |
3. Now, hitting Caps Lock alone will escape while holding it down and hitting another key will act as Control. | |
via https://coderwall.com/p/63nzva |