Skip to content

Instantly share code, notes, and snippets.

View bellerus's full-sized avatar

Brian Garcia bellerus

  • DocJuris
  • Houston, TX
View GitHub Profile
@titenkov
titenkov / vim-visual-blocks.md
Last active April 10, 2024 18:06
Use Vim visual blocks during interactive git rebase

Sometimes, when rebasing interactively with git, we need to squash a sequence of commits in a branch.

For example, we need to transform this:

pick 0253dc894f bumped
pick 5a1e86933c remove dependency
pick bffoffb395 memberships rpc resource
pick 222fabf5e0 rpc membership service
pick 726a2f9a10 remove crypto logic
@addyosmani
addyosmani / README.md
Last active April 2, 2024 20:18 — forked from 140bytes/LICENSE.txt
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

@dergachev
dergachev / GIF-Screencast-OSX.md
Last active April 19, 2024 11:00
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

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:

@biovisualize
biovisualize / index.html
Created June 9, 2011 14:42
Simple D3 tooltip
<!DOCTYPE html>
<html >
<head>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script>
</head>
<body>
<div class="example_div"></div>
<script type="text/javascript">
var tooltip = d3.select("body")
.append("div")
@jed
jed / LICENSE.txt
Created May 27, 2011 08:49 — forked from 140bytes/LICENSE.txt
rehydrate hidden text a la @zoompf
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@andrewdeandrade
andrewdeandrade / reverse_alphabetical_sort_in_backbone
Created May 1, 2011 04:10
Reverse Alphabetical Sort in Backbone.js
// Assumption: You have a model with a name.
comparator: function (User) {
if (User.get("name")) {
var str = User.get("name");
str = str.toLowerCase();
str = str.split("");
str = _.map(str, function(letter) { return String.fromCharCode(-(letter.charCodeAt(0))) });
return str;
};