Skip to content

Instantly share code, notes, and snippets.

View wi24rd's full-sized avatar

ZH王 wi24rd

View GitHub Profile
@wi24rd
wi24rd / heatmap.py
Last active October 26, 2023 03:26
# coding=GBK
# The code is provided for testing purpose ONLY as a reference solution by @wi24rd NOT a project/product of his employer.
# This code can tell you how to parse Heatmap data from Assure.
# For JAVA SDK, check https://github.com/AeroSenseSw/AeroSenseAssure/blob/main/src/main/java/com/aerosense/radar/tcp/service/fromRadar/ReportHeatMapHandler.java
import numpy as np
import winsound
import os
from matplotlib import pyplot as plt
@wi24rd
wi24rd / mirrors.txt
Created April 15, 2019 08:30
GNU GUIX mirrors
https://hydra-mirror.marusich.info/
https://guix-cloudflare.tomli.me/
https://guix-amazon.tomli.me/
https://berlin.guixsd.org/
@wi24rd
wi24rd / asus c201.md
Created October 10, 2018 04:42 — forked from jcs/asus c201.md
Disabling SPI write protection, reflashing, and unbricking an Asus Chromebook C201

####Disabling SPI write protection

Put the Chromebook in developer-mode:

  • With machine powered off, hold down Esc and Refresh(F3) while hitting power button
  • At warning prompt, hit Control+D, then Enter at prompt about enabling developer mode
  • Machine will format itself

Now remove the write-protect screw to enable flashrom to flash new Coreboot/Libreboot.

Flip powered-off machine over and remove 8 philips-head screws. 2 are located under rubber feet.

Keybase proof

I hereby claim:

  • I am wi24rd on github.
  • I am wi24rd (https://keybase.io/wi24rd) on keybase.
  • I have a public key whose fingerprint is B256 2147 D861 9E1C BF36 B86B 2BF1 E7B7 E9E4 DDE6

To claim this, I am signing this object:

[I ran across these on a Unix salesman's wall and haven't seen them posted
before. I modified them here and there. Followups are in net.jokes.]
People who come into contact with the Unix system are often told,
"If you have trouble, see so-and-so, he's a guru", or "Bob there is
a real Unix hacker."
What is a "Unix Wizard"? How does s/he differ from a "guru"?
To explore these and other questions, here is a draft of the "Unix Hierarchy":
> https://news.ycombinator.com/item?id=11070797
StreakyCobra 667 days ago [-]
I use:
git init --bare $HOME/.myconf
alias config='/usr/bin/git --git-dir=$HOME/.myconf/ --work-tree=$HOME'
config config status.showUntrackedFiles no
where my ~/.myconf directory is a git bare repository. Then any file within the home folder can be versioned with normal commands like:
config status

Enca语法

Usage: enca [-L LANGUAGE] [OPTION]... [FILE]... enconv [-L LANGUAGE] [OPTION]... [FILE]... Detect encoding of text files and convert them if required. Enca用法

$ enca -L zh_CN file 检查文件的编码 $ enca -L zh_CN -x UTF-8 file 将文件编码转换为"UTF-8"编码 $ enca -L zh_CN -x UTF-8 file1 file2 如果不想覆盖原文件可以这样

var OriginTitile=document.title;
var st;
document.addEventListener('visibilitychange',function(){
if(document.hidden){
document.title="(つェ⊂)我藏好了哦";
clearTimeout(st);
console.log('hide');
}else{
document.title='(*´∇`*) 被你发现啦~ '+OriginTitile;
console.log('show');
Gists’s search supports a variety of different operations. Here’s a quick cheat sheet for some of the common searches.
Basic search
This search Finds repositories with…
cat stars:>100 Find cat gists with greater than 100 stars.
user:defunkt Get all gists from the user defunkt.
cat anon:true Include anonymous gists in your search for cat-related gists.
NOT cat Excludes all results containing cat.
cat fork:only Search all forked gists for results containing cat.