Skip to content

Instantly share code, notes, and snippets.

javascript:(function(){var e=document.body.style.cursor;document.body.style.cursor="crosshair";var t=document.createElement("div");var n="border:1px solid #3280FF;background-color:rgba(50,128,255,0.5);position:absolute;z-index:2147483647;display:none;";var r="pointer-events:none;";var i="transition:width 60ms,height 60ms,left 60ms,top 60ms;";n+=r+"-webkit-"+r+"-moz-"+r;n+=i+"-webkit-"+i+"-moz-"+i;t.setAttribute("style",n);document.body.appendChild(t);var s=null;var o=function(e){var n=e.target;if(n!==s&&n.parentNode){var r=n.getBoundingClientRect();var i=document.documentElement;var o=document.body;var u=i.clientTop||o.clientTop||0;var a=i.clientLeft||o.clientLeft||0;var f=window.pageYOffset||i.scrollTop||o.scrollTop;var l=window.pageXOffset||i.scrollLeft||o.scrollLeft;var c=l-a+r.left-1;var h=f-u+r.top-1;t.style.display="block";t.style.left=c+"px";t.style.top=h+"px";t.style.width=r.width+"px";t.style.height=r.height+"px";s=n}};var u=function(n){document.body.style.cursor=e;if(n.target.parentNode)n.target.par
#!/usr/bin/env python
import re
import fileinput
import base64
import ast
rgx = re.compile("\"(\w+)\":")
compact = re.compile("^([A-Za-z0-9_=-]*)\\.[A-Za-z0-9_-]*=?=?.[A-Za-z0-9_-]*=?=?$")
def processjson(line):
@riking
riking / README.md
Last active January 20, 2016 19:38
Twitch Global Replacement Emotes

If an emote line has (Consensus) at the end, I won't be replacing it (because several people added it to their channel and it's the most popular version).

If you think your emote submission outperforms one of the others, please comment below and I'll change the list.

self.oninstall = function (e) {
// populate cache
// download all resources needed for offline experience
}
self.onactivate = function (e) {
// cleanup like managing cache
}
self.onfetch = function (e) {
const QueryRowContentComponent = Ember.Component.extend({
tagName: "tr",
render() {
//....
if (user) {
// file: templates/explorer/user.raw.hbs
import binarySearch from 'discourse/plugins/discourse-data-explorer/discourse/lib/binary-search';
export default Ember.Component.extend({
tagName: 'td',
user: function() {
const valueInt = parseInt(this.get('value'));
const userRelAry = this.get('extra.relations.user');
const idx = binarySearch(userRelAry, valueInt);
return userRelAry[idx];
}.property('extra.relations', 'value')
});
MAX_MESSAGES = 20
# @author Kane York (@riking)
# @license BSD 2-clause
class SaveChatMessages:
def __init__(self):
self._redis = None
def on_redis_reconnect(self, redis):
### Keybase proof
I hereby claim:
* I am riking on github.
* I am riking (https://keybase.io/riking) on keybase.
* I have a public key whose fingerprint is 8053 69D4 811B 2594 3616 FCD2 657F 460D 2089 4666
To claim this, I am signing this object:
digraph G{
aqua [fillcolor=cornflowerblue, style=filled]
aer [fillcolor=darkgoldenrod1, style=filled]
ignis [fillcolor=brown1, style=filled]
terra [fillcolor=forestgreen, style=filled]
perditio [fillcolor="gray23", fontcolor=white, style=filled]
ordo [fillcolor="beige", style=filled]
aer->vacuos;
perditio->vacuos;