Skip to content

Instantly share code, notes, and snippets.

View fearphage's full-sized avatar
⌨️
Cache rules everything around me.

Phred Lane fearphage

⌨️
Cache rules everything around me.
View GitHub Profile
({ if: bar }); // <-- "if" should not be highlighted as reserved word here
({ foo: function foo(){} }); // <-- "foo" before ":" should be highlighted as in `({ foo: function(){} })`
JSON; // <-- should be highlighted, just like other built-ins — `Object`, `Function`, `String`, etc.
console.debug, console.profile; // <-- should be highlighted just like `console.log`, `console.info`, etc.
!/^foo$/.test(t); // <-- should highlight regexp literal, just like it does w/o preceding `!`

###Object.preventExtensions

  • Make object non-extensible (can't add properties)

###Object.seal

  • Make object non-extensible (can't add properties)
  • Make object's own properties non-configurable (can't remove them, or change their nature and/or attributes)

###Object.freeze

  • Make object non-extensible (can't add properties)
  • Make object's own properties non-configurable (can't remove them, or change their nature and/or attributes)
#!/usr/bin/env bash
# where do you want couchdb and its deps to be installed
COUCHDB_PREFIX="/opt/couchdb-1.0.1"
# Let's determine the correct arcitecture and choose the installer
if [ "`uname -m`" = "x86_64" ]; then
echo "Using 64-bit installer"
COUCHDB_INSTALLER_DOC_ID="26f246a0fe23d6a53d5326713308f43c"
COUCHDB_INSTALLER_BIN="install-couchdb-1.0.1_rel1-linux-x64.bin"
.mouse, #preview{
position: absolute;
background-repeat: no-repeat;
height: 22px;
min-width: 15px;
z-index: 100;
}
.mouse{
background-image: url('../images/cursor.png');
// ==UserScript==
// @name searchalltabs.js
// @author edvakf (and thank you amachang for escapeXPathExpr)
// @namespace http://d.hatena.ne.jp/edvakf/
// @description An experimental UserJS to search for word from all tabs and move to the tab
// @license The MIT License
// @version 0.3
// @include *
// @released 2010-06-08
// @updated 2010-06-08
<!DOCTYPE HTML>
<html>
<head>
<script src="sharedworker.multi-connect.renderer.js"></script>
</head>
<body>
<pre id="shared-worker-log"></pre>
</body>
</html>
!function() {
var doc = document,
htm = doc.documentElement,
lct = null, // last click target
nearest = function(elm, tag) {
while (elm && elm.nodeName != tag) {
elm = elm.parentNode;
}
return elm;
};
// ==UserScript==
// @name Blogger Hatena Syntax
// @namespace http://d.hatena.ne.jp/edvakf/
// @description Hatena syntax and code highlight for blogger
// @include http://www.blogger.com/post-create.g*
// @include http://www.blogger.com/post-edit.g*
// ==/UserScript==
//
// Copyright (C) 2010 edvakf
//
@isaacs
isaacs / comma-first-var.js
Created April 6, 2010 19:24
A better coding convention for lists and object literals in JavaScript
// See comments below.
// This code sample and justification brought to you by
// Isaac Z. Schlueter, aka isaacs
// standard style
var a = "ape",
b = "bat",
c = "cat",
d = "dog",
// ==UserScript==
// @name Blogger Hatena Syntax
// @namespace http://d.hatena.ne.jp/edvakf/
// @description Hatena syntax and code highlight for blogger
// @include http://www.blogger.com/post-create.g*
// @include http://www.blogger.com/post-edit.g*
// ==/UserScript==
//
// Copyright (C) 2010 edvakf
//