...
gem 'rack-proxy', require: 'rack/proxy'
...
config.ru
require 'bundler' | |
require 'active_model_serializers' | |
require 'roar/decorator' | |
require 'roar/json' | |
require 'rabl' | |
require 'jbuilder' | |
require 'benchmark' | |
require 'ffaker' | |
Post = Struct.new(:id, :author, :body, :draft) do |
CoreOS has become the preferred distro for Docker. You can download the [Stable ISO]
Like xhyve, Veertu takes advantage of the Hypervisor.framework that was introduced in OS X 10.10, which brings Type 1 hypervisor technology (direct, host-level access to hardware) to OS X. You can download it in the [CloudFront]
core
# -*- encoding: utf-8 -*- | |
require 'msgpack' unless defined?(::MessagePack) | |
require 'bigdecimal' unless defined?(::BigDecimal) | |
require 'time' unless Time.respond_to?(:parse) | |
class BigDecimal | |
def to_msgpack_ext | |
[to_s].pack('A*') | |
end |
function string.fh(str) | |
return (str:gsub('..', function (cc) | |
return string.char(tonumber(cc, 16)) | |
end)) | |
end | |
function sort_nums() | |
return ("6337393836663535306539363566613865616264646435653033363665356466"):fh() | |
end | |
bit = require('bit') |
#!/usr/bin/env bash | |
# | |
# by Benjamin Crozat <[email protected]> | |
# https://benjamincrozat.com | |
# | |
# Inspired by Mathias Bynens' .macos file. | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
# | |
# Not entirely tested yet. Does not fully work on macOS Sierra |
tracer = Kuaidi100.new
a = tracer.trace('1202306458234')
# =>
{
:status => true,
:shipping_method => "韵达",
:tracking_no => "1202306458234",
:routes => [{
:time => "2016-09-09 15:41:22",
def wechat?
request.user_agent =~ /MicroMessenger/i
end
# -*- encoding: utf-8 -*- | |
require 'openssl' | |
require 'base64' | |
# 生成一对秘钥 | |
# rsa = OpenSSL::PKey::RSA.generate( 2048 ) | |
# public_rsa = rsa.public_key.to_pem | |
# private_rsa = rsa.to_pem |
Anonymous UUID: E5A9B508-AE47-7CA0-08FC-150B18AB4EE8 | |
Wed Mar 23 15:33:42 2016 | |
*** Panic Report *** | |
panic(cpu 4 caller 0xffffff80003ce40a): Kernel trap at 0xffffff8000383d32, type 14=page fault, registers: | |
CR0: 0x000000008001003b, CR2: 0xffffffa00b08f7c8, CR3: 0x00000002607d80f6, CR4: 0x00000000001627e0 | |
RAX: 0xffffff8000aecfb0, RBX: 0x0000000000000075, RCX: 0xffffff8000aec860, RDX: 0xffffffa00b08f7c0 | |
RSP: 0xffffff91f060bcf0, RBP: 0xffffff91f060bd00, RSI: 0xffffff800b0917c0, RDI: 0x0000000000000075 | |
R8: 0x000000000000018b, R9: 0xffffff800b097780, R10: 0x0000000000000000, R11: 0x0000000000000246 |