Skip to content

Instantly share code, notes, and snippets.

Hongli Lai FooBarWidget

Block or report user

Report or block FooBarWidget

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:1c56013210a5efdaf579e0c405ea10f2
{"EXIT"=>0, "HUP"=>1, "INT"=>2, "QUIT"=>3, "ILL"=>4, "TRAP"=>5, "ABRT"=>6, "IOT"=>6, "FPE"=>8, "KILL"=>9, "BUS"=>7, "SEGV"=>11, "SYS"=>31, "PIPE"=>13, "ALRM"=>14, "TERM"=>15, "URG"=>23, "STOP"=>19, "TSTP"=>20, "CONT"=>18, "CHLD"=>17, "CLD"=>17, "TTIN"=>21, "TTOU"=>22, "IO"=>29, "XCPU"=>24, "XFSZ"=>25, "VTALRM"=>26, "PROF"=>27, "WINCH"=>28, "USR1"=>10, "USR2"=>12, "PWR"=>30, "POLL"=>29}
View debug_middleware.rb
class DebugMiddleware
def initialize(app, message)
@app = app
@message = message
def call(*args)
STDERR.puts "BEGIN #{request_id} -- #{@message}"
status, headers, body =*args)
consumed_body = consume_body(body)
FooBarWidget /
Last active Oct 18, 2018
set -ex
cd $HOME
mkdir -p .ssh
chmod 700 .ssh
echo ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBCJ7+aYfRPqG7KZWpxxIwOV+z4YTOhnwTxIq9szO4GhdpLKdrBMrXMpYEut31w+g2d3N5gIDAaHUA72IfuC0Eig= macos-slave-host >> .ssh/authorized_keys
chmod 600 .ssh/authorized_keys
View gist:c5e000a32ebf74e0b64972fc56067e45
1: (259) LaunchOptions<LocalLaunchOptions xmlns=''
1: (279) LaunchOptions ExePath='/Users/hongli/Projects/passenger/buildout/test/cxx/main'
1: (279) LaunchOptions WorkingDirectory='/Users/hongli/Projects/passenger/test'
1: (279) LaunchOptions ExeArguments='-g Core_ApplicationPool_PoolTest:3'
1: (279) LaunchOptions MIMode='lldb'
1: (279) LaunchOptions MIDebuggerPath='/Users/hongli/.vscode/extensions/ms-vscode.cpptools-0.18.1/debugAdapters/lldb/bin/lldb-mi'
1: (279) LaunchOptions WaitDynamicLibLoad='false'
1: (279) LaunchOptions>
1: (279) LaunchOptions <SetupCommands>
1: (281) LaunchOptions <Command IgnoreFailures='false' Description=''>settings set target.x86-disassembly-flavor intel</Command>
View cgo-benchmark.go
package main
#include <sys/time.h>
#include <pthread.h>
static unsigned int
plusOne(unsigned int x) {
return x + 1;

Proposal for generic language support

With the new SpawningKit subsystem, we have laid the foundations for generic language support. Some time in the near future would be a good time to implement the remaining parts. This document proposes a possible user experience for generic language support, and based on this UX it describes an implementation direction.

Preface: intended audience

This proposal is specifically targeted at Phusion employees in order to receive feedback on the UX and on the implementation strategy. Section 1 equips the reader with the proper background knowledge to give such feedback.

The status of generic language support is that the lowest layer (SpawningKit) is done. With section 2 of this document, I hope to define the highest layer (the UX). Once that has been properly defined, all that would be left is to figure out how to fill the gaps in between: how to code the things on top of SpawningKit to make us achieve the defined UX. This multi-step approach should be a lot easier an

View gist:1a37d32e1f598ce79f9b8d2dafa9d5cc
root# locate rkhunter.dat
/root/rkhunter.dat.bak <---- this is a file I made myself, for analyzing changes
  • request_sockets -- an array objects describing the sockets on which the application listens for requests. The format is as follows:

        "address": "tcp://" | "unix:/path-to-unix-socket",
        "protocol": "http" | "session",
        "tags": {
          "": true | false,
          "custom tag 1": "value 1",
          "custom tag 2": "value 2"

Upon starting the preloader, the preloader listens for commands on a Unix domain socket. SpawningKit tells the preloader to spawn a worker process by:

  1. Setting up a work directory (see "The preparation and the HandshakePrepare class").

  2. Sending a command over the socket. The command is a JSON document on a single line:

    { "command": "spawn", "work_dir": "" }
View KeyChain

libcurl Keychain Problem, Solution, and Code

This is a writeup by Camden Narzt, the Passenger engineer mainly responsible for making TLS client certificates work on macOS. He has experience with using the cryptographic libraries in macOS, such as KeyChain.

This writeup is related to the following commit:

Overview of the general Problem

The original problem is that on macOS libcurl doesn’t load the client certificate in such a way that it has permission to use it without asking the user first. This causes a popup which we want to prevent.

You can’t perform that action at this time.