Skip to content

Instantly share code, notes, and snippets.

@Akagi201
Akagi201 / browser.md
Last active September 8, 2016 02:54

兼容性测试

浏览器内核/渲染引擎/排版引擎/解释引擎/Rendering Engine

  • 渲染引擎主要是负责HTML, CSS以及其他一些东西的渲染.
  • 有时, 浏览器内核, 除了渲染引擎, 也悄悄包含了javascript引擎. 如: WebKit, 它由渲染引擎WebCore和Javascript引擎JSCore组成.
  • IE: Trident
  • Safari: WebKit(KHTML分支) -> WebKit2
  • Chrome/Chromium: Chromium引擎(WebKit分支) -> Blink引擎(基于WebKit2)
  • Opera: Elektra -> Presto -> Chromium引擎 -> Blink引擎
@bingo347
bingo347 / send_fd__to_node.go
Created January 10, 2017 17:14
send file descriptor from golang to nodejs
package main
import (
"net"
"fmt"
"syscall"
)
func main() {
addr, err := net.ResolveTCPAddr("tcp", "localhost:8090")
@merryhime
merryhime / text.md
Last active April 11, 2025 01:16
Playing with segment registers fs and gs on x64

GSBASE and FSBASE

When you're running out of registers while writing a JIT, you might resort to more unconventional methods for memory access. You might choose to resort to segment registers if you need a fixed register for memory offsets.

Instructions such as:

lea    rax,gs:[rcx+rdx*8]
mov    rax,gs:[rcx+rdx*8]

would then be available for your use.

// from https://stackoverflow.com/questions/10798357/want-to-compile-native-android-binary-i-can-run-in-terminal-on-the-phone
/*
# create tool-chain - one line
# New method in ndk 12.
$NDK/build/tools/make_standalone_toolchain.py --arch arm --install-dir=/tmp/my-android-toolchain
# Old method.
#$NDK/build/tools/make-standalone-toolchain.sh --platform=android-3 --install-dir=/tmp/my-android-toolchain
# add to terminal PATH variable
export PATH=/tmp/my-android-toolchain/bin:$PATH
@coin8086
coin8086 / using-proxy-for-git-or-github.md
Last active January 24, 2025 07:47
Use Proxy for Git/GitHub

Use Proxy for Git/GitHub

Generally, the Git proxy configuration depends on the Git Server Protocol you use. And there're two common protocols: SSH and HTTP/HTTPS. Both require a proxy setup already. In the following, I assume a SOCKS5 proxy set up on localhost:1080. But it can also be a HTTP proxy. I'll talk about how to set up a SOCKS5 proxy later.

SSH Protocol

When you do git clone ssh://[user@]server/project.git or git clone [user@]server:project.git, you're using the SSH protocol. You need to configurate your SSH client to use a proxy. Add the following to your SSH config file, say ~/.ssh/config:

ProxyCommand nc -x localhost:1080 %h %p