Skip to content

Instantly share code, notes, and snippets.

View dejanr's full-sized avatar

Dejan Ranisavljević dejanr

View GitHub Profile
@dejanr
dejanr / gist:6976530
Last active December 25, 2015 12:29
A clean way to debounce a backbone view events
var Model = Backbone.View.extend({
events: {
'keyup input': 'onKeyUp'
},
onKeyUp: _.debounce(function(e){
var target = $(e.currentTarget);
this.model.set({text: target.val()});
}, 200)
})
Alfred - http://www.alfredapp.com/
Spectacle - http://spectacleapp.com/
Spotify - http://www.spotify.com/
Glimmerblocker - http://glimmerblocker.org/
Vagrant - http://downloads.vagrantup.com/

Installing and configuring dwm on OS X

  1. Install XQuartz (http://xquartz.macosforge.org) which is the development version of the X11.app that ships with OS X, which means it is way more up to date. I have had some weird issues with X11.app v. 2.3-something. XQuartz 2.5.0 fixed that.

  2. Install dwm from Homebrew, brew install dwm. This makes a bunch of necessary tweaks to the DWM configuration.

  3. Add the following script to $PATH, name it dwm-launch and chmod 755:

    cd ~
    

while true

Install and configure Terminator on Mac OS X

Preface

리눅스에서 쓰던 DWM+Terminator 조합을 OSX 에서도 사용하기 위해 이 문서를 작성함. Terminator에서는 Fink에서 쓰라고 권장하고 있지만, 난 homebrew를 쓰고 있었기 때문에 homebrew에서 할 수 있는 방법을 강구함.

Required

@dejanr
dejanr / README
Last active June 5, 2025 11:23
OSX, X11, dwm, urxvt, vim environment
OSX Apps
- Total Spaces, for keeping X11 in different space and faster switching
- MenuAndDockless for hidding topbar menu
X11 - Macports
- sudo port install xorg-server
- sudo port install xinit
- sudo port install terminus-font dejavu-fonts bitstream-fonts
Suckless - suckless.org
### Keybase proof
I hereby claim:
* I am dejanr on github.
* I am dejanr (https://keybase.io/dejanr) on keybase.
* I have a public key whose fingerprint is EE85 AAB7 2426 2405 04DC 84B6 F712 8AAD 359E 91C7
To claim this, I am signing this object:
/**
* Construct ctor with passed arguments
*/
function construct(ctor, args) {
var factory = function() {
return ctor.apply(this, args)
}
factory.prototype = ctor.prototype
return new factory()
}
@dejanr
dejanr / Equity.md
Last active August 29, 2015 14:14 — forked from isaacsanders/Equity.md

This is a post by Joel Spolsky. The original post is linked at the bottom.

This is such a common question here and elsewhere that I will attempt to write the world's most canonical answer to this question. Hopefully in the future when someone on answers.onstartups asks how to split up the ownership of their new company, you can simply point to this answer.

The most important principle: Fairness, and the perception of fairness, is much more valuable than owning a large stake. Almost everything that can go wrong in a startup will go wrong, and one of the biggest things that can go wrong is huge, angry, shouting matches between the founders as to who worked harder, who owns more, whose idea was it anyway, etc. That is why I would always rather split a new company 50-50 with a friend than insist on owning 60% because "it was my idea," or because "I was more experienced" or anything else. Why? Because if I split the company 60-40, the company is going to fail when we argue ourselves to death. And if you ju

import ko from 'common/ko';
import validation from 'common/validation';
import template from 'ui/pages/contract/contract/contract.html!text';
import contractState from 'ui/pages/contract/contract/contract-state';
import offerService from 'domain/offer-service';
import NotFoundError from 'common/not-found-error';
function createPage(ctx) {
const vm = {};
const subscriptions = [];
// Gist source: https://gist.github.com/james2doyle/5694700
const requestAnimationFrame =
window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
function (callback) { window.setTimeout(callback, 1000 / 60); };
// easing functions http://goo.gl/5HLl8
function easeInOutQuad(timestamp, start, change, duration) {