Provider | Singleton | Instantiable | Configurable |
---|---|---|---|
Constant | Yes | No | No |
Value | Yes | No | No |
Service | Yes | No | No |
Factory | Yes | Yes | No |
Decorator | Yes | No? | No |
Provider | Yes | Yes | Yes |
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
/etc/init.d/cloud-management stop | |
mysql -ppassword -e 'drop database cloud' | |
mysql -ppassword -e 'drop database cloud_usage' | |
cloud-setup-databases cloud:password@localhost --deploy-as=root:password | |
rm -rf /var/log/cloud/management/* | |
cloud-setup-management | |
/etc/init.d/cloud-management start |
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
package com.mavencode.modules.chatwindow.widget; | |
import android.app.Activity; | |
import android.app.AlertDialog; | |
import android.content.Context; | |
import android.content.DialogInterface; | |
import android.content.Intent; | |
import android.content.res.Configuration; | |
import android.graphics.SurfaceTexture; | |
import android.media.AudioManager; | |
import android.net.Uri; |
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
// Highcharts CheatSheet Part 1. | |
// Create interactive charts easily for your web projects. | |
// Download: http://www.highcharts.com/download | |
// More: http://api.highcharts.com/highcharts | |
// 1. Installation. | |
// Highcharts requires two files to run, highcharts.js and either jQuery, MooTools or Prototype or the Highcharts Standalone Framework which are used for some common JavaScript tasks. | |
// <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> | |
// <script src="https://code.highcharts.com/highcharts.js"></script> |
This was obtained from y-yoshinoya at https://gist.github.com/y-yoshinoya/413fcd3f6bfcfce54456
wget -q -O - http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc | sudo apt-key add -
sudo sh -c 'echo "deb http://download.virtualbox.org/virtualbox/debian precise non-free contrib" >> /etc/apt/sources.list.d/virtualbox.org.list'
sudo apt-get update
sudo apt-get install linux-headers-$(uname -r) build-essential virtualbox-4.3 dkms
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
<link rel="import" href="../cool-clock/cool-clock.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; | |
width: 100%; | |
height: 100%; |
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
psql-master: | |
image: 'sameersbn/postgresql:9.4-4' | |
deployment_strategy: emptiest_node | |
environment: | |
- DB_NAME=gitlabhq_production | |
- DB_PASS=password | |
- DB_USER=gitlab | |
- PSQL_MODE=replicator | |
- PSQL_TRUST_LOCALNET=true | |
- REPLICATION_USER=replicator |
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
gitlab-data: | |
image: 'sameersbn/gitlab:8.0.2' | |
command: true | |
volumes: | |
- '/home/docker/gitlab/data:/home/git/data' | |
gitlab: | |
image: 'sameersbn/gitlab:8.0.2' | |
environment: | |
- DB_HOST=psql | |
- DB_NAME=gitlabhq_production |
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
upstream shop { | |
least_conn; | |
{{range service "shop"}}server {{.Address}}:{{.Port}} max_fails=3 fail_timeout=60 weight=1; | |
{{else}}server 127.0.0.1:65535; # force a 502{{end}} | |
} | |
server { | |
listen 80; | |
server_name api.shop.com; |
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
consul = "consul.service.consul:8500" | |
template { | |
source = "/etc/consul-template/templates/shop.conf" | |
destination = "/etc/nginx/conf.d/shop.conf" | |
command = "/etc/init.d/nginx reload" | |
} |