Skip to content

Instantly share code, notes, and snippets.

View dandean's full-sized avatar
🌧️
It's raining.

Dan Dean dandean

🌧️
It's raining.
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>hello-backbonejs</title>
</head>
<body>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.js"></script>
<script src="http://ajax.cdnjs.com/ajax/libs/underscore.js/1.6.0/underscore.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/backbone.js/1.1.2/backbone.js"></script>
@dandean
dandean / gist:9076274
Created February 18, 2014 18:03
Noooooooooo!
if (foo)
bar()
else
baz()
function deleteNextTweet() {
var deleteButton = $('.js-stream-item > div:not(.retweeted) a.js-action-del')[0];
if (deleteButton) {
deleteButton.click();
setTimeout(confirmDeleteTweet, 1000);
} else {
console.log('no more tweets');
}
}
@dandean
dandean / sass.scss
Created January 28, 2014 21:33
Sass vs Stylus
@mixin box-sizing(which) {
-moz-box-sizing: which;
box-sizing: which;
}
.thing {
@include box-sizing;
}
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
uglify: {
options: {
banner: '/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %> */\n',
...
},
dist: {
files: {
@dandean
dandean / private-npmjs-registry.md
Last active February 5, 2025 05:47
How I got the npmjs.org registry running on my mac.

Install CouchDB (1.5)

$ brew install couchdb

It may throw an exception while compiling erlang. If so, you need to install a different gcc, reinstall erlang, then try the couchdb install again:

$ brew install apple-gcc42
$ brew reinstall -v --use-gcc erlang
@dandean
dandean / dabblet.css
Created July 15, 2013 04:09
CSS Puzzle: Reverse the z-order of the <li>s without setting a separate z-index on each one in a way that works in IE9 and up
/**
* CSS Puzzle: Reverse the z-order of the <li>s without setting a separate z-index on each one in a way that works in IE9 and up
*/
ul {
direction: rtl;
display: inline-block;
margin-left: 82px;
margin-top: 8px;
}
@dandean
dandean / header.css
Created May 1, 2013 17:49
CSS File Header
/*
* This file is for this thing.
*
* This should should be used in this way. This should should be used in this
* way. This should should be used in this way. This should should be used in
* this way. This should should be used in this way.
*
*****************************************************************************/
@dandean
dandean / stripey-warning.css
Created March 21, 2013 18:31
Some stripey CSS shit.
div[data-preference="card-management"]:before {
content:"";
display: block;
position: absolute;
left: 0;
top: 61px;
width: 100%;
height: 6px;
-webkit-background-size: 50px 50px, 100%;
::-webkit-scrollbar {
-webkit-appearance: none;
width: 7px;
}
::-webkit-scrollbar-thumb {
border-radius: 4px;
background-color: rgba(0,0,0,.5);
-webkit-box-shadow: 0 0 1px rgba(255,255,255,.5);
}