Skip to content

Instantly share code, notes, and snippets.

View kimroen's full-sized avatar

Kim Røen kimroen

View GitHub Profile
@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@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:

@dmfrancisco
dmfrancisco / git-workflow-manual.md
Created March 2, 2013 19:07
Another Git Workflow

Another Git Workflow *

This workflow is heavily based on the branching model presented by Vincent Driessen on his blog and applies its tool, git-flow, to make it extremely easy to follow.

git-flow is a collection of Git extensions to provide high-level opinionated operations that fit seamlessly into the usual development cycle of agile projects for the web. Its structure includes a development branch and topic branches for features, release branches for your staging environment and a master branch for production. It also offers a neat way to fix bugs already under production. Finally, each operation explains what was done after its execution, which helps you understand commands while you are not used to them yet.

So you should start by installing git-flow. Next, initialize a new repository or choose an existing one:

git flow init

@mutewinter
mutewinter / Alfred 3 Workflows.md
Last active November 25, 2020 14:14
A list of Alfred 3 workflows I'm using.
@machty
machty / new-router-examples.md
Last active April 16, 2020 22:03
How to do cool stuff with the new Router API
@ZogStriP
ZogStriP / ember.js-with-google-maps.html
Created May 31, 2013 13:32
How to use Google Maps with Ember.js
<!DOCTYPE html>
<html>
<head>
<script src="//code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.0.0-rc.3/handlebars.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/ember.js/1.0.0-rc.3/ember.js"></script>
<script src="//maps.googleapis.com/maps/api/js?sensor=false"></script>
</head>
<body>
<script>
(function (global) {
"use strict";
function empty(obj) {
var key;
for (key in obj) if (obj.hasOwnProperty(key)) return false;
return true;
}
var Ember = global.Ember,
@sebastianseilund
sebastianseilund / merged_array.js
Last active December 20, 2015 07:58
An implementation of a merged array in Ember.js that combines items from multiple source arrays so you can easily list them together in your Handlebars templates. Read the blog post at the [Billy's Billing Developer Blog](http://dev.billysbilling.com/blog/How-to-merge-multiple-data-sources-into-one-array-in-Ember-js)
/**
* `Ember.MergedArray` is an array that observes multiple other arrays (called source arrays) for changes and includes
* all items from all source arrays in an efficient way.
*
* Usage:
*
* ```javascript
* var obj = Ember.Object.create({
* people: [
* {
@jackrusher
jackrusher / OO.md
Created July 29, 2013 12:53
Gist blogging? Yet another exposition on the nature of OO programming.

Object-orientation

There are many articles and discussion threads on the web regarding the nature of Object-oriented (OO) programming. Most of them come at the question from a Programming Language Theory (PLT) perspective, attempting to assert a formal definition of OO programming and objects. I'm not going to do that here. Instead, I'm going to write about objects from an implementation perspective, approaching the subject first from below and then from above.

@JeffreyWay
JeffreyWay / gist:6176883
Created August 7, 2013 18:19
Add this to your bash_profile. Now, whenever you need to fetch your ssh-key, just type sshkey, and it'll be copied to your clipboard.
alias sshkey="cat ~/.ssh/id_rsa.pub | pbcopy && echo 'Copied to clipboard.'"