References:
- http://blog.bekijkhet.com/2012/05/install-teamcity-continuous-integration.html
- https://gist.github.com/ianbattersby/4641450
sudo apt-get update
| /*jslint regexp: true, maxerr: 50, indent: 2 */ | |
| (function (global) { | |
| "use strict"; | |
| function URLUtils(url, baseURL) { | |
| var m = String(url).replace(/^\s+|\s+$/g, "").match(/^([^:\/?#]+:)?(?:\/\/(?:([^:@\/?#]*)(?::([^:@\/?#]*))?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/); | |
| if (!m) { | |
| throw new RangeError(); | |
| } |
| # Traversing arrays and objects in CoffeeScript | |
| # The array and object we use for testing | |
| arr = [1, 2, 3, 4, 5] | |
| obj = {a: 1, b: 2, c: 3, d: 4, e: 5} | |
| # 'in' has a different meaning in CoffeeScript than in JavaScript | |
| # CS: element in array -> JS: array.indexOf(element) >= 0 | |
| console.log '5 in arr: ' + (5 in arr) |
| #!/bin/bash | |
| # from here: http://www.codingsteps.com/install-redis-2-6-on-amazon-ec2-linux-ami-or-centos/ | |
| # and here: https://raw.github.com/gist/257849/9f1e627e0b7dbe68882fa2b7bdb1b2b263522004/redis-server | |
| ############################################### | |
| # To use: | |
| # wget https://raw.github.com/gist/2776679/04ca3bbb9f085b192f6aca945120fe12d59f15f9/install-redis.sh | |
| # chmod 777 install-redis.sh | |
| # ./install-redis.sh | |
| ############################################### | |
| echo "*****************************************" |
| // node.js proxy server example for adding CORS headers to any existing http services. | |
| // yes, i know this is super basic, that's why it's here. use this to help understand how http-proxy works with express if you need future routing capabilities | |
| var httpProxy = require('http-proxy'), | |
| express = require('express'); | |
| var proxy = new httpProxy.RoutingProxy(); | |
| var proxyOptions = { | |
| host: '192.168.3.11', |
| #!/bin/bash | |
| # THESE ARE NOTES, NOT TESTED AS SCRIPT! | |
| # We need the following to get and run teamcity agent | |
| sudo apt-get install openjdk-7-jre-headless | |
| sudo apt-get install unzip #For unzipping buildAgent.zip | |
| # For compiling Simple.Web | |
| sudo apt-get install ruby1.9.1 |
| #!upstart | |
| description "MyApp" | |
| author "MyApp by charlie" | |
| env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
| respawn | |
| start on runlevel [23] | |
| stop on shutdown |
References:
sudo apt-get update
| /** | |
| * Example of using an angular provider to build an api service. | |
| * @author Jeremy Elbourn (@jelbourn) | |
| */ | |
| /** Namespace for the application. */ | |
| var app = {}; | |
| /******************************************************************************/ |
| <?php | |
| /** | |
| * WooCommerce Extra Feature | |
| * -------------------------- | |
| * | |
| * Register a shortcode that creates a product categories dropdown list | |
| * | |
| * Use: [product_categories_dropdown orderby="title" count="0" hierarchical="0"] | |
| * |