Skip to content

Instantly share code, notes, and snippets.

View JamieLottering's full-sized avatar
🐰

Jamie Lottering JamieLottering

🐰
View GitHub Profile

Keybase proof

I hereby claim:

  • I am jamielottering on github.
  • I am jamielottering (https://keybase.io/jamielottering) on keybase.
  • I have a public key ASBjKSBX9Lp-ZkG7QaZWmqZil7trJWblZ9iZ2sSAVnjlewo

To claim this, I am signing this object:

# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@JamieLottering
JamieLottering / tree-walker.js
Last active December 15, 2015 20:09
Detect identical nodes using the node's position
// Ignore whitespace && body nodes
function shouldIgnoreNode(node) {
return (node.nodeName === 'BODY' || node.nodeType === 8 || node.nodeType === 3);
}
// Safely walk up previousSibling nodes by ignoring whitespace nodes
function getPrevNode(node) {
var sibling = node.previousSibling;
if (!sibling) {
(function (env, obj) {
var arrayType = '[object Array]';
function flatten (arr) {
var flattened = [];
var i = 0, l = arr.length;
for(; i < l; i++) {
var value = arr[i];
@JamieLottering
JamieLottering / shape.css
Created July 28, 2011 22:56
Horizontal Ribbon Shape
.ribbon {
border-color: #cc0000 transparent #cc0000 transparent;
border-style: solid;
border-width: 16px;
color: #fff;
position: relative;
text-align: center;
width: 250px;
}
.ribbon:before {
@JamieLottering
JamieLottering / custom_theme.css
Created July 3, 2011 22:44
DropKick Examples
.dk_theme_black {
background: #aebcbf;
background: -moz-linear-gradient(top,
#aebcbf 0%,
#6e7774 50%,
#0a0e0a 51%,
#0a0809 100%
);
background: -webkit-gradient(linear,
left top,