This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.controller('DemoController', function ($scope, MyService) { | |
var _count = 0; | |
function _privateUtil() { // function decomposition | |
_count += _count + 1; | |
} | |
function _handleClick(data) { | |
_privateUtil(); | |
$scope.answer = MyService.doSomething({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// private field init | |
var a = 1; | |
// public field init | |
$scope.b = 1; // For controllers | |
this.c = 1; // For services | |
// call init function | |
init(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// private field init | |
var a = 1; | |
// Initialization logic is here | |
if () { | |
... | |
} | |
// Private functions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="description" content="Vitaly final" /> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
<style id="jsbin-css"> | |
div { | |
height: 100px; | |
width: 100px; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
safereset = "!f() { \ | |
trap 'echo ERROR: Operation failed; return' ERR; \ | |
echo Making sure there are no changes...; \ | |
last_status=$(git status --porcelain);\ | |
if [[ $last_status != \"\" ]]; then\ | |
echo There are dirty files:;\ | |
echo \"$last_status\";\ | |
echo;\ | |
echo -n \"Enter Y if you would like to DISCARD these changes or W to commit them as WIP: \";\ | |
read dirty_operation;\ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ID | Last SHA | Owner | Branch | Title | |
---- | ---------- | --------------- | ------------------------------ | ---------------------------------------- | |
197 | 9287bb6 | jkirkpatrick | qa | Protractor tests with multiple chrome profiles | |
150 | 8791ab9 | oliversalzburg | feature/strict-di | fix(strictdi): Use strict DI wherever possible | |
136 | d2ca167 | itsananderson | fix-strict-di | Annotate config and decorator to avoid strictDI errors | |
120 | bab8b92 | jayhogan | bindings | Show element binding expressions in the sidebar panel alongside | |
118 | 1642b4a | hupfis | master | Use outline instead of border to keep layout | |
111 | 4498e13 | blackxored | add-class-to-inspector | Add class to floating inspector | |
106 | 9537399 | rpl | prototype/firefox-devtools-port| WIP: port to Firefox | |
105 | 0e55aef | caitp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
safereset = "!f() { \ | |
trap 'echo ERROR: Operation failed; return' ERR; \ | |
echo Making sure there are no changes...; \ | |
last_status=$(git status --porcelain);\ | |
if [[ $last_status != \"\" ]]; then\ | |
echo There are dirty files:;\ | |
echo \"$last_status\";\ | |
echo;\ | |
echo -n \"Enter D if you would like to DISCARD these changes or W to commit them as WIP: \";\ | |
read dirty_operation;\ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@setlocal | |
@echo off | |
set userChoice=%1 | |
rem The format is: | |
rem call :condition SHORTCUT FOLDER | |
call :condition web c:\Git\SecThor\SecWeb\App\ | |
call :condition cloud c:\Git\SecThor\SecCloud\dojo.backend\ | |
call :condition good c:\Users\Vitaly\Dropbox\Projects\goodread-friends\ | |
endlocal | |
popd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Open new Terminal tabs from the command line | |
# | |
# Author: Justin Hileman (http://justinhileman.com) | |
# | |
# Installation: | |
# Add the following function to your `.bashrc` or `.bash_profile`, | |
# or save it somewhere (e.g. `~/.tab.bash`) and source it in `.bashrc` | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "iTerm" | |
-- Create a new terminal window or tab. | |
set myterm to (make new terminal) | |
tell myterm | |
-- Create a new session. | |
set mysession to (make new session at the end of sessions) |
OlderNewer