Skip to content

Instantly share code, notes, and snippets.

@cs8425
cs8425 / setDefaultNS.go
Last active March 5, 2023 05:17
DNS resolve workaround for android in pure go
package main
import (
"fmt"
"net"
"sync"
"time"
_ "unsafe"
)
@cs8425
cs8425 / ubuntu-18.04-amd64.md
Last active September 21, 2018 05:58
Intel Atom x5-Z8300 7zip benchmark

Lemel智慧電腦棒至尊版

  • CPU: Intel Atom x5-Z8300
  • RAM: DDR3 2G
  • storage: 32GB eMMC, Micro SD(max 128GB)
  • network: 802.11 b/g/n, BT 4.0 (BT not work on ubutnu 18.04)

info

user@user-NH2:~$ uname -a
Linux user-NH2 4.15.0-29-generic #31-Ubuntu SMP Tue Jul 17 15:39:52 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
@cs8425
cs8425 / MSPCodes.js
Last active November 8, 2024 11:16
read 'USB Simulator Cable' as joystick and send to betaflight SITL via MSP over tcp.
// from https://github.com/betaflight/betaflight-configurator
'use strict';
//MSPCodes needs to be re-integrated inside MSP object
var MSPCodes = {
MSP_API_VERSION: 1,
MSP_FC_VARIANT: 2,
MSP_FC_VERSION: 3,
MSP_BOARD_INFO: 4,
MSP_BUILD_INFO: 5,
@cs8425
cs8425 / README.md
Last active September 11, 2024 14:52
How to REAL install Remix OS on VirtualBox

How to REAL install Remix OS on VirtualBox

This is how to REAL install Remix OS on VirtualBox. rootfs could be writable!!!

Needs:

  • any linux liveCD iso file (Xubuntu here)
  • Remix OS iso file ("Remix_OS_for_PC_Android_M_32bit_B2016092201.iso" here)
  • VirtualBox
@cs8425
cs8425 / keyemu.go
Last active February 1, 2024 15:26
simple keyboard & mouse binding over web in golang
// build:
// GOOS=windows GOARCH=386 go build -o keyemu.exe keyemu.go
// GOOS=windows GOARCH=amd64 go build -o keyemu-x64.exe keyemu.go
// pre-build: https://mega.nz/#F!c9M0VaqK!sjUh5jwAU1tYkVv8z9YqaQ
// ref: https://github.com/micmonay/keybd_event
package main
@cs8425
cs8425 / key.sh
Created January 11, 2016 06:55
golang simple tcp/tls proxy
# wrok like:
#
# raw tcp(9999) tls(127.0.0.1:25500) raw tcp(25501)
# client =============> tcp2tls_client.go =====================> tls2tcp_server.go ==============> real server
#Generated private key
openssl genrsa -out server.key 2048
#To generate a certificate
@cs8425
cs8425 / 7zb
Created December 8, 2015 09:21
scaleway
7-Zip (A) 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18
p7zip Version 9.20 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,4 CPUs)
RAM size: 2023 MB, # CPU hardware threads: 4
RAM usage: 850 MB, # Benchmark threads: 4
Dict Compressing | Decompressing
Speed Usage R/U Rating | Speed Usage R/U Rating
KB/s % MIPS MIPS | KB/s % MIPS MIPS
@cs8425
cs8425 / app.js
Last active November 23, 2015 17:47
/*
"name": "express",
"version": "4.12.3",
"name": "socket.io",
"version": "1.3.5",
*/
var express = require('express');
var http = require('http');
var app = express();
@cs8425
cs8425 / 7zb
Last active October 13, 2015 19:19
7-zip benchmark on ZenFone 2 (4G/64G) with chroot
cs8425@localhost:~$ 7z b
7-Zip [64] 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18
p7zip Version 9.20 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,4 CPUs)
RAM size: 3907 MB, # CPU hardware threads: 4
RAM usage: 850 MB, # Benchmark threads: 4
Dict Compressing | Decompressing
Speed Usage R/U Rating | Speed Usage R/U Rating
@cs8425
cs8425 / proxy.js
Last active October 3, 2015 05:46
simple http to https proxy (with ws)
var fs = require('fs');
var http = require('http');
var https = require('https');
var httpProxy = require('http-proxy');
http.globalAgent.maxSockets = 10000;
https.globalAgent.maxSockets = 10000;
var options = {
https: {