Skip to content

Instantly share code, notes, and snippets.

View sasha7's full-sized avatar

Sasa Macakanja sasha7

View GitHub Profile
{
"ecmaVersion": 6,
"libs": ["browser"],
"loadEagerly": [
"app/**/*.js"
],
"plugins": {
"doc_comment": {
"fullDocs": true
},
@sasha7
sasha7 / gist:4fc7e3094c35bbcddfccad85b006c3de
Created November 14, 2017 23:31 — forked from tinifni/gist:3756796
Remember what you've done since your last standup
# zsh script checks first if there were any commits done
# by author yesterday. If there were, return those. If
# there weren't, look for all commits since last Friday
# at midnight as it may have been a weekend.
#
# Use your name in the --author for all commands
gitstandup() {
if [ -z "$(git log --all --pretty=format:'* %s' --no-merges --reverse --author=Justin --since=yesterday.midnight)" ]; then
git log --all --pretty=format:'* %s' --no-merges --reverse --author=Justin --since=last.friday.midnight;
#!/usr/bin/env ruby
# Colorize string
class String
def colorize(color_code)
"\e[#{color_code}m#{self}\e[0m"
end
end
class Colors
@sasha7
sasha7 / zsh theme
Created May 25, 2017 00:25 — forked from hub23/zsh theme
Custom ZSH Theme
# user colors
if [ $UID -eq 0 ]; then USERCOLOR="red"; else USERCOLOR="green"; fi
# box name
function box_name {
[ -f ~/.box-name ] && cat ~/.box-name || echo $HOST
}
# workdir
local current_dir='${PWD/#$HOME/~}'
@sasha7
sasha7 / lazylibs.service.ts
Created May 10, 2017 23:50 — forked from JohannesRudolph/lazylibs.service.ts
Angular lazy library loader
import { Injectable, Inject } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import { ReplaySubject } from 'rxjs/ReplaySubject';
import { DOCUMENT } from '@angular/platform-browser';
@Injectable()
export class LazylibsService {
private chartJs?: ReplaySubject<any>;
@sasha7
sasha7 / aprompt.png
Created February 20, 2017 13:30 — forked from mislav/aprompt.png
My zsh prompt. No oh-my-zsh needed
aprompt.png
@sasha7
sasha7 / goto-sublime
Last active February 15, 2017 14:52 — forked from kendellfab/goto-sublime
Add mouse click `goto definition` in sublime text 3.
Linux - create "Default (Linux).sublime-mousemap" in ~/.config/sublime-text-3/Packages/User
Mac - create "Default (OSX).sublime-mousemap" in ~/Library/Application Support/Sublime Text 3/Packages/User
Win - create "Default (Windows).sublime-mousemap" in %appdata%\Sublime Text 3\Packages\User
[
{
"button": "button1",
"count": 1,
"modifiers": ["super"],
"press_command": "drag_select",
@sasha7
sasha7 / sublime-text-3-setup.md
Created February 15, 2017 14:25 — forked from ijy/sublime-text-3-setup.md
My Sublime Text 3 setup.

Sublime Text 3 Setup

Install Package Control

Install Package Control for easy package management.

  1. Open the console with Ctrl+`
  2. Paste in the following:
@sasha7
sasha7 / gitflow-breakdown.md
Created February 13, 2017 01:22 — forked from JamesMGreene/gitflow-breakdown.md
A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
git commit --allow-empty -m "Initial commit"
git checkout -b develop master

Connect to the remote repository

@sasha7
sasha7 / flash-app.js
Created January 28, 2017 00:38 — forked from brianmacarthur/flash-app.js
Flash messaging in Express 4: express-flash vs. custom middleware in ejs, handlebars, or jade
var express = require('express');
var cookieParser = require('cookie-parser');
var session = require('express-session');
var flash = require('express-flash');
var handlebars = require('express-handlebars')
var app = express();
var sessionStore = new session.MemoryStore;
// View Engines