Skip to content

Instantly share code, notes, and snippets.

View sptq's full-sized avatar
:electron:

Marcin Grochulski sptq

:electron:
View GitHub Profile
@sptq
sptq / wallaby.js
Created May 16, 2018 07:58
Wallaby.js configuration for create react app
module.exports = function (wallaby) {
// Babel, jest-cli and some other modules may be located under
// react-scripts/node_modules, so need to let node.js know about it
var path = require('path');
process.env.NODE_PATH +=
path.delimiter +
path.join(__dirname, 'node_modules') +
path.delimiter +
path.join(__dirname, 'node_modules/react-scripts/node_modules');
@sptq
sptq / .gitconfig
Created January 3, 2017 11:14 — forked from piotros/.gitconfig
Some useful git aliases that I use
[alias]
# branches list
b = branch -vv
# branch name
branch-name = "!git rev-parse --abbrev-ref HEAD"
# checkout
c = checkout
@sptq
sptq / resourceLookup.controller.js
Last active November 23, 2016 22:53
Angular 1.5.x Controller Class
/**
* Lodash version
*/
import {assign, each} from 'lodash';
export default class ResourceLookupController {
constructor() {
each(arguments, (o, i) => assign(this, {[this.constructor.$inject[i]] : o}));
this.name = 'resource-lookup';
}

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
angular.module('myMdl', []).config(['$httpProvider', function($httpProvider) {
$httpProvider.responseInterceptors.push([
'$q', '$templateCache', 'activeProfile',
function($q, $templateCache, activeProfile) {
// Keep track which HTML templates have already been modified.
var modifiedTemplates = {};
// Tests if there are any keep/omit attributes.
var HAS_FLAGS_EXP = /data-(keep|omit)/;
@sptq
sptq / Git alias
Last active August 29, 2015 14:02
My git configuration file.
[user]
name = sptq
email = [email protected]
# ===[ALIAS-START]===
#
[alias]
c = checkout
" Init
" {{{
runtime bundle/vim-pathogen/autoload/pathogen.vim
call pathogen#infect()
call pathogen#helptags()
set nocompatible
syntax on
set encoding=utf-8

Setup

git clone <repo>

clone the repository specified by ; this is similar to "checkout" in some other version control systems such as Subversion and CVS

Add colors to your ~/.gitconfig file:

@sptq
sptq / Vagrant
Created February 24, 2014 20:34
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.