Skip to content

Instantly share code, notes, and snippets.

@douyw
douyw / 01-ubuntu-16.04-setup.md
Created January 5, 2017 09:41 — forked from tomysmile/01-ubuntu-16.04-setup.md
Ubuntu 16.04 Setup in Digital Ocean

Initial Server Setup with Ubuntu 16.04

Update Packages

$ sudo apt-get update

Add Swap

local xcCLANG = [ SHELL "xcrun -sdk iphoneos -f clang" ] ;
local CLANG = [ MATCH "([^
]*)" : $(xcCLANG) ] ;
ECHO "CLANG = $(CLANG)" ;
local xcDEVDIR = [ SHELL "xcode-select --print-path" ] ;
local DEVDIR = [ MATCH "([^
]*)" : $(xcDEVDIR) ] ;
ECHO "DEVDIR = $(DEVDIR)" ;
@douyw
douyw / server.js
Created November 28, 2012 06:33 — forked from tbranyen/server.js
backbone/node.js pushState enabled server
// Require libraries
var os = require("os");
var fs = require("fs");
var readline = require("readline");
var cluster = require("cluster");
var express = require("express");
var site = express.createServer();
// Var up, bro
var i, read;
@douyw
douyw / CMakeLists.txt
Created November 17, 2012 08:14 — forked from sixman9/CMakeLists.txt
cmake files for Apple IOS development (has C++ lean, can be adapted however)
# See original post at http://stackoverflow.com/questions/822404/how-to-set-up-cmake-to-build-an-app-for-the-iphone
cmake_minimum_required(VERSION 2.8)
cmake_policy(SET CMP0015 NEW)
cmake_policy(SET CMP0016 NEW)
project(test)
set(NAME test)
@douyw
douyw / manifest.json
Created November 4, 2012 13:16 — forked from Jxck/manifest.json
Chrome Socket API Server
{
"manifest_version": 2,
"name": "Chrome Socket API Server",
"description": "listen & accept for socket",
"version": "0.1",
"app": {
"background": {
"scripts": ["server.js"]
}
},
@douyw
douyw / 23-aws.t
Created October 12, 2012 04:49
[lua-Spore] Auth.AWS
#!/usr/bin/env lua
require 'Test.More'
if not pcall(require, 'crypto') then
skip_all 'no crypto'
end
plan(14)
@douyw
douyw / AWS.lua
Created October 12, 2012 04:38 — forked from vladfedin/AWS.lua
Amazon S3 REST API description and tests for lua-Spore
--
-- lua-Spore : <http://fperrad.github.com/lua-Spore/>
--
--[[
See http://docs.amazonwebservices.com/AmazonS3/latest/dev/index.html?RESTAuthentication.html
]]
local pairs = pairs
local tostring = tostring