View gist:b36c7cd7ef2560b0e5e1a713205d8e28
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ./runsample open foo.db | |
COMMAND: scan | |
START KEY: {"name": "bar", "timestamp": 0} | |
END KEY: {"name": "foo", "timestamp": 100} | |
{"name": "bar", "timestamp": 1} {"value": "bbb"} | |
{"name": "bar", "timestamp": 10} {"value": "bbb"} | |
{"name": "foo", "timestamp": 1} {"value": "bbb"} | |
{"name": "foo", "timestamp": 10} {"value": "bbb"} |
View dict.ll
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare i32 @putchar(i32) | |
declare i8* @gets(i8* nocapture) nounwind | |
declare i32 @strcmp(i8*, i8*) nounwind | |
%node = type{ %node*, i8*, i32 } | |
@foo.key = private constant [4 x i8] c"foo\00" | |
@foo = private constant %node { | |
%node* @bar, | |
i8* getelementptr([4 x i8], [4 x i8]* @foo.key, i32 0, i32 0), |
View itc.ll
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare i32 @putchar(i32) | |
@xt_A = private constant i8* blockaddress(@main, %i_A) | |
@xt_B = private constant i8* blockaddress(@main, %i_B) | |
@xt_exit = private constant i8* blockaddress(@main, %i_exit) | |
@code = private constant [5 x i8**] [ | |
i8** @xt_A, | |
i8** @xt_B, | |
i8** @xt_A, |
View dtc.ll
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare i32 @putchar(i32) | |
@code = private constant [5 x i8*] [ | |
i8* blockaddress(@main, %A), | |
i8* blockaddress(@main, %B), | |
i8* blockaddress(@main, %A), | |
i8* blockaddress(@main, %B), | |
i8* blockaddress(@main, %exit) | |
] |
View CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 3.10) | |
project(myproject) | |
set(CMAKE_CXX_STANDARD 14) | |
find_package(LLVM REQUIRED CONFIG) | |
include_directories(${LLVM_INCLUDE_DIRS}) | |
add_definitions(${LLVM_DEFINITIONS}) |
View httpd.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost *> | |
ServerName blog.riywo.com | |
ProxyPreserveHost On | |
ProxyRequests off | |
<Proxy balancer://blog> | |
BalancerMember http://localhost:1313 | |
BalancerMember http://blog.riywo.com.s3-website-us-west-2.amazonaws.com status=+H | |
</Proxy> | |
ProxyPass / balancer://blog/ | |
</VirtualHost> |
View gist:9976219fd5fd7fb22ea6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aws_s3_sync = "aws --region us-west-2 s3 sync public s3://blog.riywo.com --delete --storage-class=REDUCED_REDUNDANCY" | |
task :default => :server | |
task :server do | |
sh 'rm -fr public' | |
exec 'hugo server -b http://blog.riywo.com --appendPort=false -w --disableLiveReload' | |
end | |
task :test do | |
sh %Q{#{aws_s3_sync} --dryrun --size-only} |
View gist:d77903a393e2f8df1580
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<main class="content" role="main"> | |
<article class="post post-section {{ .Section }}"> | |
{{ range .Data.Pages.GroupByDate "Jan 2006" }} | |
<h3>{{ .Key }}</h3> | |
<ul> | |
{{ range .Pages }} | |
<li> | |
<a href="{{ .Permalink }}">{{ .Title }}</a> | |
</li> | |
{{ end }} |
View gist:0aee4f20f6f8a2a35242
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
classification=spark-defaults,properties=[spark.dynamicAllocation.enabled=true,spark.executor.memory=2G,spark.executor.cores=2] |
View c.coffee
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
coffee> i*i for i in [1..9] when i % 2 == 0 | |
[ 4, 16, 36, 64 ] | |
# https://github.com/jashkenas/coffee-script/issues/2030 | |
# http://brehaut.net/blog/2011/coffeescript_comprehensions | |
coffee> [i,j] for j in [1..3] for i in [1..3] | |
[ [ [ 1, 1 ], | |
[ 1, 2 ], | |
[ 1, 3 ] ], | |
[ [ 2, 1 ], |
NewerOlder