Skip to content

Instantly share code, notes, and snippets.

View flexbox's full-sized avatar

David Leuliette flexbox

View GitHub Profile
@flexbox
flexbox / How to fork your own repository
Created October 12, 2016 13:34
How to fork your own repository
A git fork is really just a git clone plus a change of ownership. What this does is a git clone plus a change of name, maintaining an upstream link to the source repo so you can integrate changes.
Here's a recipe for duplicating a repo:
git clone username/old_repo new_repo
cd new_repo
git remote rename origin upstream
git create username/new_repo
git push -u origin master

Contract Killer

Le contrat open-source à destination des designers et développeurs Web par Stuff & Nonsense


mymodule {
@at-root {
.#{&}-header { ... }
.#{&}-footer { ... }
.#{&}-body {
a { ... }
span { ... }
p { ... }
}
}
// Straightforward + simple.
$("button").on("click", function(event) {
event.preventDefault();
var button = $(this);
var numberElem = button.find(".number");
var number = Number(numberElem.text()) - 1;
numberElem.text(number);
if (number === 0) {
button.prop("disabled", true);
button.off("click");
<table>
<thead>
<tr>
<th scope="col">Name</th>
<th scope="col">Email</th>
<th scope="col">Dept, Title</th>
<th scope="col">Phone</th>
</tr>
</thead>
<tbody>