Skip to content

Instantly share code, notes, and snippets.

View MilanGrubnic70's full-sized avatar

Milan Grubnic MilanGrubnic70

View GitHub Profile
@MilanGrubnic70
MilanGrubnic70 / bash_profile.txt
Last active April 2, 2016 01:38
Set up bash profile with aliases.
Type:
nano ~/.profile_bash
ctrl + o
enter
ctrl + x
to use:
echo "Hello, Milan Grubnić!"
alias his="history"
alias hist="history"
@MilanGrubnic70
MilanGrubnic70 / Directives
Created March 3, 2016 03:16
Angular Directives
app.directive('appInfo', function() {
return {
restrict: 'E',
scope: {
info: '='
},
templateUrl: 'js/directives/appInfo.html'
};
});
@MilanGrubnic70
MilanGrubnic70 / angularJS.md
Last active March 1, 2016 11:33
AngularJS Cheatsheet

AngularJS

ng = A**ng**ular

A module contains the different components of an AngularJS app

A controller manages the app's data

A directive tells that a module will live within the element, termed the application's scope. It defines the scope.

An expression displays values on the page

@MilanGrubnic70
MilanGrubnic70 / python_cheatsheet.txt
Last active February 17, 2016 02:40
Python Cheatsheet
python
exit()
python -m SimpleHTTPServer
localhost:8000
ctrl + c
@MilanGrubnic70
MilanGrubnic70 / sinatra_cheatsheet.md
Created February 14, 2016 00:43
Sinatra Cheatsheet

require 'rubygems' # Ruby 1.9 Ruby automatically loads RubyGems so you dont' need this line. require 'sinatra' require 'data_maper'

Sinatra will always look in the public/ folder for css files. Sinatra will alwasy look in the views/ folder for erb files.

@MilanGrubnic70
MilanGrubnic70 / Jasmine.Reference.txt
Last active January 24, 2016 05:05
Jasmine Cheat Sheet
Matchers Reference
toEqual checks for equality, not necessarily the same object.
toBe checks if two objects are the same.
toBeTruthy checks if a value is truthy (not just true).
toBeFalsy checks if a value is falsy (not just false).
toContain checks if a value is inside another.
toBeDefined checks if a value is defined.
toBeUndefined checks if a value is undefined.
toBeNull checks if a value is null.
@MilanGrubnic70
MilanGrubnic70 / jasmine.js
Created January 24, 2016 05:02
Jasmine: The Basic Structure of a Suite
describe("colors", function() {
describe("red", function() {
var red;
beforeEach(function() {
red = new Color("red");
});
afterEach(function() {
red = null;
});
it("has the correct value", function() {
@MilanGrubnic70
MilanGrubnic70 / shell_profile.txt
Created November 7, 2015 18:08
Shell aliases.
type:
subl ~/.profile
enter
# set Aliases
alias gs='git status'
alias ga='git add'
alias gb='git branch'
alias gc='git commit'
alias gd='git diff'
@MilanGrubnic70
MilanGrubnic70 / git_config.txt
Created November 7, 2015 18:04
Git config with aliases.
type:
subl ~/.gitconfig
enter
[user]
email = MilanG@aol.com
name = Milan Grubnić
[color]
ui = true
[credential]
@MilanGrubnic70
MilanGrubnic70 / prompt.md
Created October 23, 2015 16:40
Shorten Terminal Command Line

PS1='\u:\W$ '