Rough outline of setting up a Ubuntu server for deploying an Elixir app with Distillery.
ssh into server
ssh root@ip.address
update packages
| map $http_upgrade $connection_upgrade { | |
| default upgrade; | |
| '' close; | |
| } | |
| upstream server_cluster { | |
| # sticky connections are critical for non-WebSocket Socket.io | |
| # http://socket.io/docs/using-multiple-nodes/ | |
| ip_hash; | 
| { | |
| "translations": { | |
| "locale": [ | |
| { | |
| "id": "ru", | |
| "name": "\u0420\u0443\u0441\u0441\u043a\u0438\u0439", | |
| "pluralEquation": "({x}%10==1 && {x}%100!=11 ? 1 : {x}%10>=2 && {x}%10<=4 && ({x}%100<10 || {x}%100>=20) ? 2 : 3)", | |
| "literal": [ | |
| { | |
| "name": "key-of-yours", | 
| namespace KeyboardFocusDebugger | |
| { | |
| // This will sort a set of components, so that they are ordered in terms of | |
| // left-to-right and then top-to-bottom. | |
| struct ScreenPositionComparator | |
| { | |
| static int compareElements(const Component* const first, const Component* const second) | |
| { | |
| const int explicitOrder1 = getOrder(first); | |
| const int explicitOrder2 = getOrder(second); | 
Rough outline of setting up a Ubuntu server for deploying an Elixir app with Distillery.
ssh into server
ssh root@ip.address
update packages
| /* | |
| ============================================================================== | |
| BinarySearch.h | |
| Created: 31 Jul 2014 9:57:04am | |
| Author: Adam Wilson | |
| ============================================================================== | |
| */ | 
| import sys | |
| # A script to minify css based on Chrome's css audit -> needs a text file of unused selectors. | |
| if len(sys.argv) < 3: | |
| print("Usage: python ./truncate_css.py input.css unused.txt output.css") | |
| quit() | |
| reload(sys) | 
| import os | |
| import sys | |
| import fnmatch | |
| from tinypng import shrink_file | |
| apiKey = "your key" | |
| rootdir = sys.argv[1] | |
| for root, dirs, files in os.walk(os.path.abspath(rootdir)): | 
| #ifndef SCOPEDMEMORYBLOCK_H_INCLUDED | |
| #define SCOPEDMEMORYBLOCK_H_INCLUDED | |
| template<typename T> | |
| class ScopedMemoryBlock final | |
| { | |
| public: | |
| ScopedMemoryBlock() noexcept : data(nullptr), size(0) {} | |