Sample code for on how to lazy load state for ui-router
- http://www.peopleware.do
This file contains 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
var glob = require('glob'); | |
var path = require('path'); | |
module.exports = function(app) { | |
var ds = app.dataSources['automailer-db'] | |
var files = glob.sync(path.join(__dirname, '..', '..', '/common/models/*.json')) | |
files.forEach(function(file) { | |
var modelDefinition = require(file) |
This file contains 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
user sniproxy | |
pidfile /var/run/sniproxy.pid | |
listener 209.208.27.224 80 { | |
proto http | |
table proxies | |
} | |
listener 209.208.27.224 443 { |
This file contains 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
FROM java:openjdk-8 | |
MAINTAINER mkroli | |
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64 | |
ENV SERVICEMIX_VERSION_MAJOR=7 | |
ENV SERVICEMIX_VERSION_MINOR=0 | |
ENV SERVICEMIX_VERSION_PATCH=1 | |
ENV SERVICEMIX_VERSION=${SERVICEMIX_VERSION_MAJOR}.${SERVICEMIX_VERSION_MINOR}.${SERVICEMIX_VERSION_PATCH} | |
RUN wget http://www-us.apache.org/dist/servicemix/servicemix-${SERVICEMIX_VERSION_MAJOR}/${SERVICEMIX_VERSION}/apache-servicemix-${SERVICEMIX_VERSION}.zip; \ |
This file contains 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
# Include plugins | |
require 'autotest/fsevent' | |
require 'autotest/growl' | |
# Skip some paths | |
Autotest.add_hook :initialize do |autotest| | |
%w{.git .DS_Store ._* vendor}.each { |exception| autotest.add_exception(exception) } | |
false | |
end |
This file contains 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
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc | |
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/ | |
// author: Pawel Kozlowski | |
var myApp = angular.module('myApp', []); | |
//service style, probably the simplest one | |
myApp.service('helloWorldFromService', function() { | |
this.sayHello = function() { | |
return "Hello, World!" |
This file contains 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
FROM fedora:23 | |
ENV RACK_ENV=production RAILS_ENV=production | |
ENV APP_HOME /home/app/logica-erp | |
ENV SECRET_KEY_BASE_KDS=ddb70f72d4e61d32e30c941748f50d6e4e338adc05662235d5003a41218154141c081c548aa7a101c157825c6ac1250cf60504c7993e96045b7d33bc483c2dd8 | |
RUN dnf update -y | |
RUN dnf install https://downloads.ulyaoth.net/rpm/ulyaoth-1.1.0-1.fedora.noarch.rpm -y | |
RUN dnf install -y ulyaoth-nginx-passenger5 ulyaoth-nginx-passenger5-selinux | |
RUN dnf install -y git make curl-devel openssl-devel ruby-devel rubygem-bundler libxslt-devel libxml2-devel java-devel patch gcc-c++ redhat-rpm-config |
This file contains 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
user nginx; | |
worker_processes auto; | |
error_log /var/log/nginx/error.log warn; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; |
This file contains 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
"gcc: error: /usr/lib/rpm/redhat/redhat-hardened-cc1: No such file or directory" CentOS's and Fedora +22 workaround | |
Install `redhat-rpm-config` | |
$ sudo dnf install redhat-rpm-config |
This file contains 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
#!/usr/bin/env bash | |
func_check_for_root() { | |
if [ ! $( id -u ) -eq 0 ]; then | |
echo "ERROR: $0 Must be run as root, Script terminating" ;exit 7 | |
fi | |
} | |
func_check_for_root | |
#SETUP PARAMS |