Skip to content

Instantly share code, notes, and snippets.

View kosmikko's full-sized avatar

Mikko Lehtinen kosmikko

  • Applifier
  • Helsinki, Finland
View GitHub Profile
@kosmikko
kosmikko / gist:3083602
Created July 10, 2012 14:24
Makefile for compiling frontend assets
# build output dirs
BUILD_DIR = build
JS_BUILD_DIR = $(BUILD_DIR)/js
CSS_BUILD_DIR = $(BUILD_DIR)/css
IMG_BUILD_DIR = $(BUILD_DIR)/img
VENDOR_BUILD_DIR = $(BUILD_DIR)/vendor
TESTS_BUILD_DIR = test/build
# sources
TEMPLATES = $(shell find app -name '*.hbs')
@kosmikko
kosmikko / gist:3512434
Created August 29, 2012 13:24 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@kosmikko
kosmikko / .gitconfig
Created October 24, 2012 07:04
My .gitconfig
[user]
name = Mikko Lehtinen
email = [email protected]
[alias]
st = status
stb = status -sb
co = checkout
promote = !$ZSH/bin/git-promote
wtf = !$ZSH/bin/git-wtf

tmux cheatsheet

Default prefix is crtl+b As configured in my dotfiles.

start new:

tmux

start new with session name:

CTRL+a
Move cursor to beginning of the line. (I think of this as anchoring my cursor to the start.)
CTRL+e
Move cursor to the end of the line.
CTRL+k
Delete everything from under the cursor to the end of the line. (I think of this as killing the rest of my line.)
CTRL+f
@kosmikko
kosmikko / javascript_resources.md
Created June 2, 2014 11:01 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
@kosmikko
kosmikko / css_resources.md
Created June 2, 2014 11:01 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

@kosmikko
kosmikko / gist:00d6567ad74c02d961f8
Created March 4, 2015 13:10
Use netrc to allow "go get" for private repos
package main
import (
"log"
"reflect"
"strings"
)
type RoleAccess struct {
RoleName string
@kosmikko
kosmikko / robodog.js
Created January 20, 2016 09:42
robodog
class GameObject {
constructor(name) {
this.name = name;
}
sayName() {
console.log(`Hi, I am ${this.name}`);
}
}