Skip to content

Instantly share code, notes, and snippets.

View shamiao's full-sized avatar

SHA Miao shamiao

  • Lone Outpost Tech (Dalian) Co., Ltd.
  • Dalian, Liaoning, CHINA
View GitHub Profile
@shamiao
shamiao / y9000x-benchmark-memo.txt
Created November 24, 2019 05:52
Y9000X编译测试步骤备忘
测试环境
----------
所有测试均在 Windows 10 1903 版本上进行。测试中关闭 Windows Defender 的所有防护。
软件环境采用 Rust 1.39.0 stable 版本,系统安装 Visual Studio 2019 生成工具(C++ 生成工具)。
对于MacBook也追加测试在macOS Mojave下的表现。
一般的 cargo 项目
@shamiao
shamiao / main.rs
Created September 9, 2019 10:12
gd32vf103-example-raw_pointer_gpio_test_1
#![no_std]
#![no_main]
extern crate panic_halt;
use riscv_rt::entry;
#[entry]
fn main() -> ! {
let gpioa_ctl0 = 0x4001_0800_usize as *mut u32;
@shamiao
shamiao / dbbackup.sh
Created January 26, 2015 04:31
l4homestead-dbbackup v0.0.1
#! /bin/bash
# l4homestead-dbbackup
# v0.0.1
#
# 2014 - 2015 (C) SHA Miao
#
# Published under MIT License. See LICENSE file for details.
#
@shamiao
shamiao / sf1010000000724476.html
Last active August 29, 2015 14:07
SegmentFault Q1010000000724476
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>bs3 Example</title>
<link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.2.0/css/bootstrap.min.css">
<!--[if lt IE 9]>
<script src="http://cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="http://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
#! /usr/bin/env python3
# NOTE: This program is a quick & dirty snippet.
# CONTAINS A LOT OF ASSUME, AND BARELY NO EXCEPTION HANDLING.
# Problem URL: http://blog.segmentfault.com/felix021/1190000000399153
# License: public domain
def full_hash(matrix):
# Unsigned, 20bit (=1048576) MAX
hash_result = 0
@shamiao
shamiao / sf1010000000349642.css
Last active December 30, 2015 00:09
[SegmentFault.com]Q1010000000349642:style.css
html
{
height:100%
}
body
{
font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;
background:#F6F6F3;
color:#444;
font-size:87.5%;