Skip to content

Instantly share code, notes, and snippets.

Luke Arduini luk-

Block or report user

Report or block luk-

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
View pr.md

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

View gist:5365959
var record = {
id: idgen(20) ,
data: {
ip: parts[0],
agent: parts[1],
url: parts[2],
referrer: parts[3],
mobile: mobile
}
};
View .jshintrc
{
"predef": [ "assert", "refute", "define" ]
, "boss": true
, "bitwise": true
, "shadow": true
, "trailing": true
, "immed": true
, "latedef": true
, "forin": false
, "curly": false
@luk-
luk- / gist:4158931
Created Nov 28, 2012 — forked from fdmanana/gist:832610
The CouchDB replicator database
View gist:4158931

1. Introduction to the replicator database

A database where you PUT/POST documents to trigger replications and you DELETE to cancel ongoing replications. These documents have exactly the same content as the JSON objects we used to POST to /_replicate/ (fields "source", "target", "create_target", "continuous", "doc_ids", "filter", "query_params".

Replication documents can have a user defined "_id". Design documents (and _local documents) added to the replicator database are ignored.

The default name of this database is _replicator. The name can be changed in the .ini configuration, section [replicator], parameter db.

2. Basics

@luk-
luk- / index.html
Created Nov 8, 2012 — forked from mbostock/.block
SVG Linear Gradient (D3)
View index.html
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?1.27.1"></script>
</head>
<body>
<script type="text/javascript">
var w = 960,
h = 500;
View process.js
// https://github.com/joyent/node/blob/master/src/node.cc#L2103
//
console.log(
typeof process !== "undefined" && {}.toString.call(process) === '[object process]'
);
@luk-
luk- / inset_input.css
Created Oct 4, 2012 — forked from nrrrdcore/inset_input.css
The Perfect Inset Input CSS
View inset_input.css
input {
height: 34px;
width: 100%;
border-radius: 3px;
border: 1px solid transparent;
border-top: none;
border-bottom: 1px solid #DDD;
box-shadow: inset 0 1px 2px rgba(0,0,0,.39), 0 -1px 1px #FFF, 0 1px 0 #FFF;
}
@luk-
luk- / _gradients.sass
Created Sep 20, 2012 — forked from mihar/_gradients.sass
SASS mixing for CSS3 gradients
View _gradients.sass
=gradient($from, $to)
/* fallback/image non-cover color */
background-color: $from
/* Firefox 3.6+ */
background-image: -moz-linear-gradient($from, $to)
/* Safari 4+, Chrome 1+ */
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from($from), to($to))
@luk-
luk- / gist:3744633
Created Sep 18, 2012 — forked from mstyne/gist:3744554
couchdb init, from debian
View gist:3744633
#!/bin/sh -e
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
You can’t perform that action at this time.