Skip to content

Instantly share code, notes, and snippets.

Usman usmonster

  • Paris, New York, Internet
Block or report user

Report or block usmonster

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
usmonster / textContent.js
Last active Aug 29, 2015 — forked from eligrey/textContent.js
Updated Node.prototype.textContent shim for IE8 ONLY
View textContent.js
(function() {
// inspired by Eli Grey's shim @
// heavily modified to better match the spec:
if (Object.defineProperty && Object.getOwnPropertyDescriptor &&
Object.getOwnPropertyDescriptor(Element.prototype, 'textContent') &&
!Object.getOwnPropertyDescriptor(Element.prototype, 'textContent').get) {
// NOTE: Neither of these "drop-in" patterns would work:
// Object.defineProperty(..., ..., descriptor); // nope!
usmonster / aight_textContent_test.html
Created May 22, 2014
tests for Element.prototype.textContent shim INCOMPLETE DRAFT
View aight_textContent_test.html
<!DOCTYPE html>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<script type="text/javascript">
var log;
if ('console' in window && 'log' in window.console) {
log = function (x){ console.log(x); };
} else {
usmonster / aight_textContent_bug.html
Last active Aug 29, 2015
bug in aight's shim for Element.prototype.textContent
View aight_textContent_bug.html
<!DOCTYPE html>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<script type="text/javascript">
function test() {
try {
var e = document.createElement('div');
e.innerHTML = '&nbsp;';
usmonster /
Last active Jan 4, 2016
Steps to export Vesuvius from LP to GH. Result here:
# Steps to export Vesuvius from LP to GH.
# Replace [username] and ~/path/to/vesuvius with the appropriate values.
# NOTE: This is NOT a script, but a series of commands you should run by hand.
# Also, much of this was found on .
# get the tools
sudo apt-get update
sudo apt-get install bzr-fastimport # adds fast-export to bzr if you don't already have it
sudo apt-get upgrade git # make sure git is the most current!
usmonster / ie8CssOutlineNoneBug.html
Last active Dec 25, 2015
The CSS rule `outline:none;` causes IE8 to barf when accessing a target element's `.currentStyle["outline"]` (or `.currentStyle["outlineWidth"]`). Fun! If you must, use instead `outline:0;` or `outline:none 0;`. (But really, [just avoid it](, okay?) (Note: this is fine when in a newer IE version but in "IE8 Standards m…
View ie8CssOutlineNoneBug.html
<!DOCTYPE html>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta charset="utf-8" />
<div id="foo" style="outline:none;">Test</div>
<script language="javascript" type="text/javascript">
View browserpad
data:text/html, <html>
modified from
answer to
<style type="text/css">
usmonster / Posts.scala
Created May 15, 2012
Maybe we don't need to modify anything (signaturewise)? Maybe this is enough?
View Posts.scala
// ...
@Signature(parameters=Array("post_type", "subdomain", "group", "title", "body", "author"))
def create_post(post_type: String, subdomain: String, group: String, title:String = null, body:String, author:String) = wrap {
// not sure if this is efficient, but you get the idea
val CreatePost = post_type match {
case "short_post" => CreateShortPost(GroupRef(subdomain, group), body, UserRef(author))
case "long_post" => CreateLongPost(GroupRef(subdomain, group), title, body, UserRef(author))
// ... case else invalid
You can’t perform that action at this time.