- Controllers are named like SomeCtrl, SomeEditCtrl, etc..
- Controllers of the same Domain are specified in the same file (unless they become to big)
- Resources are called SomeResource and defined as a factory
Application.Common.directive('ifRole', ["AuthService", function(AuthService) { | |
return { | |
restrict: "A", | |
transclude: "element", | |
scope: {}, | |
compile: function(el, attrs, transclude) { | |
var currentUserRole = AuthService.currentUser.role; | |
var specifiedRole = attrs.ifRole; | |
return function(scope, el, attrs) { |
App.factory('Search', function(Restangular) { | |
return Restangular.all("searches").getList(); | |
}); |
var db = require('./database.js'), | |
tasks = {}, | |
taskToRun = process.argv[2], | |
taskRunner; | |
tasks.makeThumbnail = require('./tasks/makeThumbnail'); | |
tasks.uploadToS3 = require('./tasks/uploadToS3'); | |
taskRunner = function(task){ |
### Server | |
| Name | Bereich | URL | | |
| ------------- | -------------- | ---------------------------------------------------------------------------- | | |
| nodejs | runtime | [http://nodejs.org/](http://nodejs.org/) | | |
| express | lib/framework | [http://expressjs.com/](http://expressjs.com/) | | |
| socket.io | lib/framework | [http://socket.io/](http://socket.io/) | | |
| node-ffi | lib/framework | [https://github.com/rbranson/node-ffi](https://github.com/rbranson/node-ffi) | | |
| gulp | build-tool | [http://gulpjs.com/](http://gulpjs.com/) | | |
| jasmine | unit-tests | [http://jasmine.github.io/](http://jasmine.github.io/) | |
[alias] | |
csm = ! sh -c 'pushd $0 >/dev/null && REV=$(git rev-parse HEAD|cut -c1-7) && popd && git add -A $0 && git commit -m \"submodule $0 -> $REV\"' |
I hereby claim:
To claim this, I am signing this object:
dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get -y purge |
tmp=$(mktemp /tmp/commit-msg.XXXX) | |
hook=$(stat -f $(git rev-parse --git-dir))/hooks/commit-msg | |
git filter-branch -f --msg-filter "cat > $tmp; \"$hook\" $tmp; cat $tmp" START..END |
branch-start = "!f() { git log $1 --reverse --ancestry-path $(git merge-base $1 HEAD)..HEAD --pretty=%H | head -n1; }; f" | |
branch-end = "!f() { git log $1 --ancestry-path $(git merge-base $1 HEAD)..HEAD --pretty=%H | head -n1; }; f" | |
merge-commit = "!f() { FROM=$(git branch-start $1 | cut -c1-6); TO=$(git branch-end $1 | cut -c1-6); git merge --ff-only $1; git commit --allow-empty -m \"merge ${1} ${FROM}..${TO}\"; }; f" | |
## csm = commit submodule with changes | |
csm = "!f() { git reset $1; HEAD=$(git diff --ignore-submodules=dirty --submodule=log $1 | head -n1 | sed -e 's/^Submodule //g' -e 's/:$//g'); TAIL=$(git diff --ignore-submodules=dirty --submodule=log $1 | tail -n +2 | sed -e 's/$/ /g'); git add -A $1 && git commit -m \"${HEAD}\" -m \"${TAIL}\"; }; f" | |
branch-name = "!git rev-parse --abbrev-ref HEAD" | |
last-branch-name = "!f() { echo $(git rev-parse --symbolic-full-name @{-1} | sed -e 's/refs\\/heads\\///' ); }; f" |