View network-namespace-demo.sh
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
#!/usr/bin/env bash | |
set -x | |
main_if=ens33 | |
ping_count=1 | |
echo 1 > /proc/sys/net/ipv4/ip_forward || exit 1 | |
ip netns del ns1 > /dev/null 2>&1 |
View a.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
[agentzh@fed34-min ~ 0 ]$ sudo "dnf" install -y "openresty-openssl111-asan" | |
Last metadata expiration check: 0:00:01 ago on Tue May 11 12:26:10 2021. | |
Dependencies resolved. | |
================================================================================================================================================================================== | |
Package Architecture Version Repository Size | |
================================================================================================================================================================================== | |
Installing: | |
openresty-openssl111-asan x86_64 1.1.1i-5.fc34 openresty 2.1 M | |
Installing dependencies: | |
libasan x86_64 11.1.1-1.fc |
View hello.sp
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
[V=browser-hello.mp4] Hi, I'm Matthew from OpenResty Inc. In this video, I'll demonstrate how to implement a "hello world" HTTP interface using OpenResty. | |
First of all, we make sure we are using OpenResty's nginx. | |
[delay=0] $ export PATH=/usr/local/openresty/nginx/sbin:$PATH | |
$ which nginx | |
[S] It's usually in this path. | |
And then we go to the home directory. |
View or-lua-module.sp
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
[V=browser-hello-module.mp4] Hello, I'm Matthew from OpenResty Inc. Today I'd demonstrate how to write your own Lua modules in your OpenResty applications, step by step. | |
Let's put our simple OpenResty application in a new directory named 'test-module'. | |
$ cd ~/ | |
$ mkdir test-module/ | |
$ cd test-module/ | |
And then we create the sub-directory structure as always: |
View rr-staprun-errors.tx
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
$ sudo rr /opt/stap-plus/bin/staprun hello.ko | |
rr: Saving execution to trace directory `/root/.local/share/rr/staprun-0'. | |
[FATAL /home/agentzh/git/rr/rr/src/record_syscall.cc:5724:rec_process_syscall_arch()] | |
(task 26471 (rec:26471) at time 394) | |
-> Assertion `t->regs().syscall_result_signed() == -syscall_state.expect_errno' failed to hold. Expected ENOSYS for 'init_module' but got result 0 (errno SUCCESS); execution of syscall unsupported by rr | |
Tail of trace dump: | |
{ | |
real_time:2421511.598055 global_time:374, event:`SYSCALLBUF_FLUSH' tid:26471, ticks:453980 | |
{ syscall:'close', ret:0x0, size:0x10 } | |
{ syscall:'openat', ret:0x3, size:0x10 } |
View fix.patch
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
From 100d5e81de0f34ebba38472e373dece4c3449ea4 Mon Sep 17 00:00:00 2001 | |
From: "Yichun Zhang (agentzh)" <yichun@openresty.com> | |
Date: Tue, 3 Mar 2020 15:15:30 -0800 | |
Subject: [PATCH] Bug: proc_mem_rss() broken on older kernels lacking | |
MM_SHMEMPAGES. | |
This is a regression introduced in commit de253786000. | |
--- | |
buildrun.cxx | 3 +++ | |
runtime/linux/autoconf-mm-shmempages.c | 5 +++++ |
View dns_server.lua
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
local bit = require "bit" | |
local byte = string.byte | |
local lshift = bit.lshift | |
local rshift = bit.rshift | |
local concat = table.concat | |
local insert = table.insert | |
local char = string.char | |
local band = bit.band | |
local sub = string.sub | |
local gsub = string.gsub |
View gmail-stmp-tls.lua
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
local account = "blah@gmail.com" -- use your own gmail account | |
local password = "password" -- if you enable 2-phase authentication, you need to | |
-- generate and use a application-specific password here... | |
local sender_name = "Jon Snow" | |
local recipient = "recipient@foo.com" | |
local recipient_name = "Arya Stark" | |
local mail_title = "This is a test mail" | |
local mail_body = [[<html><body><p>Mail Body...</body></html>]] |
View s390x-luajit2-test-failures.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
=== test/unportable/math_special.lua | |
Failed test when running /home/agentzh/git/luajit2-test-suite/s390x-luajit math_special.lua 1: 132 | |
=== test/ffi/ffi_enum.lua | |
/opt/luajit-s390x/bin/luajit-2.1.0-beta3: ffi_enum.lua:53: too many callbacks | |
Failed test when running /home/agentzh/git/luajit2-test-suite/s390x-luajit ffi_enum.lua 1: 256 | |
=== test/ffi/ffi_nosink.lua | |
=== test/ffi/ffi_jit_array.lua | |
=== test/ffi/ffi_parse_struct.lua | |
=== test/ffi/ffi_arith_ptr.lua | |
=== test/ffi/ffi_const.lua |
NewerOlder