I've been having trouble with serving a Flask app via uWSGI and nginx, so I thought I'd put together some of the basics to help out others.
- Flask is managed by
uWSGI
. uWSGI
talks tonginx
.
/********************************************************************************************************* | |
* Windows Registered I/O (RIO) Sample Code (Echo Server) | |
* Minimum requirement: Windows 8 or Windows Server 2012 | |
* Author: @sm9kr | |
* | |
* Notice | |
* 몇몇 코드 조각들은 (http://www.serverframework.com/asynchronousevents/rio/)에서 가져옴. | |
* 그런데 여기도 제대로 완성된 코드가 있었던 것은 아니라서 상당 부분 기능을 추가하여 동작하도록 함. | |
* RIO의 사용법을 보여주기 위한 코드라 최대한 간단하게 필요한 부분만 넣었음. | |
* 그래서, 버그가 있을 수 있음... |
The following Lua program generates a Lua bytecode program called ignore-unsigned-sga.fnt
, which in turn loads a DLL from within an extremely locked down Lua 5.1 sandbox in a program called RelicCOH2.exe. The remainder of this document attempts to explain how this program works by a whirlwind tour of relevent bits of the Lua 5.1 virtual machine.
if string.dump(function()end):sub(1, 12) ~= "\27Lua\81\0\1\4\4\4\8\0" then
error("This generator requires a 32-bit version of Lua 5.1")
end
local function outer()
local magic -- In bytecode, the stack slot corresponding to this local is changed
#!/usr/bin/ruby | |
# Create display override file to force Mac OS X to use RGB mode for Display | |
# see http://embdev.net/topic/284710 | |
require 'base64' | |
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay` | |
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten | |
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten |
route = 8.0.0.0/255.0.0.0 | |
route = 58.0.0.0/255.0.0.0 | |
route = 23.0.0.0/255.0.0.0 | |
route = 117.0.0.0/255.0.0.0 | |
route = 199.0.0.0/255.0.0.0 | |
route = 190.0.0.0/255.0.0.0 | |
route = 198.0.0.0/255.0.0.0 | |
route = 173.0.0.0/255.0.0.0 | |
route = 174.0.0.0/255.0.0.0 | |
route = 168.0.0.0/255.0.0.0 |
#utf-8 | |
require 'netaddr' | |
newfile = File.open("some_file", "w") | |
File.foreach('out_ip').with_index { |line, line_num| | |
line = line.split(',')[0].to_s | |
a = NetAddr::CIDR.create(line) | |
puts "#{a.ip}/#{a.wildcard_mask}" | |
newfile.write("route = #{a.ip}/#{a.wildcard_mask}\n") |
*.strings utf16 diff=localizablestrings |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.