Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@cs8425
cs8425 / gist:2383514
Created April 14, 2012 10:47
2bit_to_8LED
module led8( select, d );
input[2:0] select;
output[7:0] d;
wire[2:0] select;
reg[7:0] d;
always @( select or d )
begin
@cs8425
cs8425 / mux4.v
Created April 14, 2012 11:08
mux4
module mux4( d, s, y );
input [3:0]d;
input [1:0]s;
output y;
wire [3:0]d;
wire [1:0]s;
wire y;
assign y= (s == 2'b00)? d[0]: (s == 2'b01)? d[1]: (s == 2'b10)? d[2] : d[3];
@cs8425
cs8425 / gist:2383629
Created April 14, 2012 11:10
gate2to4
module xbox( a, o );
input [1:0]a;
output [3:0]o;
assign o = 4'b0001 << a ;
endmodule
@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: {
@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 / 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
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 / gist:7869055
Created December 9, 2013 08:25
M-JPG http header
http://stackoverflow.com/questions/2060953/httpwebresponse-with-mjpeg-and-multipart-x-mixed-replace-boundary-myboundary
var BOUNDARY = '----' + Math.random().toString(16).substring(2);
header("Cache-Control: no-cache");
header("Cache-Control: private");
header("Pragma: no-cache");
header("Content-type: multipart/x-mixed-replace; boundary=$boundary");
============================
HTTP/1.1 200 OK
Content-Type: multipart/x-mixed-replace; boundary=--myboundary
@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 / README.md
Last active November 9, 2022 09:03
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