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 APP = {}; | |
APP.data = (function(){ | |
var data = {}; | |
var exports = {}; | |
var getData = function(key) { | |
return data[key]; | |
}; | |
exports.getData = getData; |
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
# Some useful Unicode entities | |
# Non-Breaking Space | |
snippet nbs | |
| |
# ← | |
snippet left | |
← | |
# → | |
snippet right | |
→ |
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
{ | |
"Sol": { | |
"name": "Sol", | |
"proper_names": ["Sol", "Helios", "The Sun"], | |
"age": "4800 million years", | |
"standard_error_in_age": "0%", | |
"heavy_element_abundance": "100% of Sol", | |
"standard_error_in_heavy_element_abundance": "0%", | |
"arity": "singular", | |
"points_of_interest": "The \"8\" in the Detected Planets entry is not an error. Pluto is not a \"planet,\" but a huge, close-orbiting, low-eccentricity Kuiper Belt object. With a big moon. Of course, some die-hards out there still insist that it really is a planet, more for sentimental reasons than anything else. They're welcome to live in their little fantasy world. Neener neener.", |
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
<script language="JavaScript" type="text/javascript"> | |
// Comcast Cable Communications, LLC Proprietary. Copyright 2012. | |
// Intended use is to display browser notifications for critical and time sensitive alerts. | |
var SYS_URL='/e8f6b078-0f35-11de-85c5-efc5ef23aa1f/aupm/notify.do'; | |
// var image_url='http://servicealerts.comcast.net:8080/images/mt'; | |
var image_url='http://xfinity.comcast.net/constantguard/BotAssistance/notice/images'; | |
var headertext1='<strong>Comcast Courtesy Notice</strong>'; | |
var textline1='You have reached 90% of your <b>monthly data usage allowance</b>.'; | |
var textline2='Please sign in for more information and to remove this alert.'; | |
var acknowledgebutton='<a href=\"#\" onClick="document.location.href=\''+SYS_URL+'?dispatch=redirect&redirectName=login¶mName=bmUid\'" title="Sign in to acknowledge" style="color: #FFFFFF;"><img alt="Sign in to acknowledge" src="'+image_url+'/mt_signin.png"/></a>'; |
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
/* | |
* Hex Opacity Values | |
*/ | |
100% — FF | |
95% — F2 | |
90% — E6 | |
85% — D9 | |
80% — CC | |
75% — BF |
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
require 'nokogiri' | |
require 'open-uri' | |
require 'json' | |
require 'yaml' | |
f = open('https://duckduckgo.com/bang.html', {"User-Agent" => 'Ruby script parsing the full list of bangs/1.0 ; http://evaryont.me'}).read | |
n = Nokogiri.parse(f) | |
class DDGBang < Struct.new(:category, :group, :bang, :aliases, :full_name) | |
def to_json(*) |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<meta name="description" content=""> | |
<meta name="keywords" content=""> | |
<meta name="author" content=""> |
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
/** | |
* Trim a block of text to a specified amount of characters. | |
* | |
* @param string elem string to 'cut'. | |
* @param integer length Character count/length. Default 30. | |
* @param string more Text to display as 'more'. Default '...' | |
* | |
* @return string | |
*/ | |
$.textExcerpt = function (elem, length, more) { |
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
// set an identifier for the console div | |
var consoleId = 'debug_console'; | |
// initialize the debug console, dock to bottom of page | |
var debugConsole = function () { | |
var body = document.getElementsByTagName('body')[0]; | |
// since this function also gets called on clear(), | |
// we'll remove the div if it exists so we can re-add it |
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
// ==UserScript== | |
// @name youtube home page without recommended block | |
// @namespace bb20ce10-d0d4-11e4-b9d6-1681e6b88ec1 | |
// @include http://www.youtube.com/ | |
// @include https://www.youtube.com/ | |
// @version 1.0 | |
// @grant none | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js | |
// ==/UserScript== |
OlderNewer