http://docs.scala-lang.org/style/
https://github.com/alexandru/scala-best-practices
Follow scala-lang style guide with the following additions.
| #!/bin/sh | |
| ps aux | grep ssh[:] | awk {'print $2'} | xargs kill -9 | 
| siege -c 20 -d 0 -H "Content-Type: application/x-www-form-urlencoded" -g 'http://localhost:3000/endpoint POST mydata=foo' | |
| siege -c 20 -d 0 -H "Content-Type: application/json" -g 'http://localhost:3000/endpoint POST {"key": "value"}' | 
| var webpack = require('webpack'); | |
| module.exports = { | |
| entry: { | |
| app: './entry.js' | |
| }, | |
| output: { | |
| path: __dirname, | |
| publicPath: '/assets/', | |
| filename: "[name].bundle.js" | 
http://docs.scala-lang.org/style/
https://github.com/alexandru/scala-best-practices
Follow scala-lang style guide with the following additions.
| # First, install Ubuntu 16 LTS (http://www.ubuntu.com/download/desktop) and open a terminal | |
| # sudo means 'do this thing as the superuser', apt-get is a way to install software, nodejs and npm are two software packages you'll need | |
| sudo apt-get install nodejs npm | |
| # Creates the directory 'myfirstserver' | |
| mkdir myfirstserver | |
| # Changes the current directory to myfirstserver | |
| cd myfirstserver | 
| // 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!" | 
Follow the steps below to install Team City 9.0.3 on Ubuntu with Nginx as the proxy for port 80.
Install Team City:
# will install on port 8111
sudo wget -c https://gist.githubusercontent.com/sandcastle/9282638/raw/teamcity-install.sh -O /tmp/teamcity-install.sh
| #!/bin/sh | |
| redis-cli keys "*" | head -n $1 > keys.txt | |
| cat keys.txt | xargs -n 1 -L 1 redis-cli ttl > ttl.txt | |
| paste -d " " keys.txt ttl.txt | grep .*-1$ | cut -d " " -f 1 | redis-cli del | 
| from wsgiref.simple_server import WSGIServer, WSGIRequestHandler | |
| def echo(environ, start_response): | |
| status = "304 Not Modified" | |
| headers = [("Content-type", "application/json"), ("ETag", "asdf")] | |
| start_response(status, headers) | |
| return [""] | |
| httpd = WSGIServer(('0.0.0.0', 80), WSGIRequestHandler) | |
| httpd.set_app(echo) | 
| [{ | |
| "keys": ["ctrl+a"], | |
| "command": "move_cursor_beginning" | |
| }, { | |
| "keys": ["shift+ctrl+a"], | |
| "command": "select_to_beginning" | |
| }] |