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 |
sudo su | |
apt-get install curl git subversion imagemagick libmagickwand-dev mysql-server mysql-client libmysqlclient-dev | |
# password, password <- for mysql | |
curl -L get.rvm.io | bash -s stable --ruby=2.1.2 | |
useradd -r redmine |
Moved to git repository: https://github.com/denji/nginx-tuning
For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.
Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon
with HyperThreading enabled, but it can work without problem on slower machines.
You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.
=begin | |
Jekyll tag to include Markdown text from _includes directory preprocessing with Liquid. | |
Usage: | |
{% markdown <filename> %} | |
=end | |
module Jekyll | |
class MarkdownTag < Liquid::Tag | |
def initialize(tag_name, text, tokens) | |
super | |
@text = text.strip |
/** | |
* @author zhixin wen <[email protected]> | |
* @version 0.0.1 | |
* @github https://github.com/wenzhixin/ | |
* @blog http://wenzhixin.net.cn | |
*/ | |
(function($) { | |
'use strict'; |
Sometimes you want to have a subdirectory on the master
branch be the root directory of a repository’s gh-pages
branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master
branch alongside the rest of your code.
For the sake of this example, let’s pretend the subfolder containing your site is named dist
.
Remove the dist
directory from the project’s .gitignore
file (it’s ignored by default by Yeoman).
// Copyright (c) 2012 Sutoiku, Inc. (MIT License) | |
function PV(rate, periods, payment, future, type) { | |
// Initialize type | |
var type = (typeof type === 'undefined') ? 0 : type; | |
// Evaluate rate and periods (TODO: replace with secure expression evaluator) | |
rate = eval(rate); | |
periods = eval(periods); |
Create a Meteor app and put the client_/server_ files in a client/server directories. Also, create a public dir to save the uploaded files.
# tunnel - secure tunnel to my vps | |
description "ssh tunnel" | |
start on (local-filesystems and network-device-up IFACE!=lo) | |
stop on runlevel [!12345] | |
respawn | |
respawn limit 5 60 # respawn max 5 times in 60 seconds | |
umask 022 |