Skip to content

Instantly share code, notes, and snippets.

@incompl
incompl / gist:3819571
Last active March 19, 2023 16:05
Git needs help

The git command-line interface sucks

When I use git, I'm scared I'll break something. I just talked to an open source celebrity who has used git for 3-4 years who avoids using the CLI because he's afraid he'll break something, and uses Tower when possible. I recently had a client accidentally delete their work because they didn't understand git. My fear of breaking something is well-founded.

You can't put a price on the confidence that source control is supposed to give you. That confidence suffers when people are afraid of causing irreparable damage during normal use.

This article lists a few ideas on what git can do to improve.

A Controlled Vocabulary

@incompl
incompl / gist:1048678071ecfb280a5f
Last active January 4, 2021 18:54
The correct meta viewport tag to use for everything, please don't disable scaling thanks!
<meta name="viewport" content="width=device-width">
gravity = new b2Vec2(0,9.8),
world = new b2World,gravity,true)
Greg Smith:
dogs are eggs
Pete Karl II:
"Land seals"
Greg Smith:
dogs are animals who bark, sometimes. you can’t really say that in general because some dogs who bark aren’t dogs
Pete Karl II:
Barking happens most times.
Greg Smith:
dogs are eggs, but also they lay eggs
$.ajaxPrefilter(function(options, originalOptions, jqXHR) {
options.username = 'greg';
options.password = 'foo';
});

Greg's CSS Styleguide

A fork of a CSS styleguide starting point

Terminology

/* this whole thing is a rule */
selector {
  property: value; /* this line is a declaration */

}

@incompl
incompl / css.style.md
Last active December 28, 2015 22:19
A Starting Point for CSS Styleguides

A Starting Point for CSS Styleguides

This is a CSS styleguide that you could fork to use for your project. Some of the rules give you multiple acceptable options. If you want to adopt this styleguide for your project, you should modify it for your project.

Here is an example styleguide made from this starting point

This styleguide follows my styleguide for styleguides. That means it follows the following rules:

  • Focus on readability.
  • Focus on consistency.
@incompl
incompl / thermorules.md
Created November 15, 2013 19:01
Thermostat Rules

Thermostat Rules

Minimum Temperature: 60 Maximum Temperature: 75 Position of swtich: Always Off

What do if the room I'm in is too hot/cold:

Change the temperature such that it continues to abide by the rules.

cloak.configure({
// New users go to the lobby, a special
// room that exists by default.
autoJoinLobby: true,
// Create a new room automatically when there are
// enough users in the lobby. Users are added
// to the new room when it's created.
autoCreateRooms: true,
var games = {};
io.sockets.on('connection', function(socket) {
var id = socket.id;
var game = games[id];
if (game === undefined) {
game = new MyGame();
games[id] = game;
}