Skip to content

Instantly share code, notes, and snippets.

View zjm1060's full-sized avatar

jianmin zhuang zjm1060

  • HangZhou.China
View GitHub Profile
FROM ubuntu:18.04
RUN sed -i 's@http://.*ubuntu.com@http://repo.huaweicloud.com@g' /etc/apt/sources.list
RUN apt update
RUN apt install -y locales git openssh-server vim nautilus \
openjdk-17-jre make gcc-aarch64-linux-gnu \
g++-aarch64-linux-gnu gdb-multiarch \
gcc-arm-linux-gnueabihf \
/*
* Copyright (C) 2015 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
// SPDX-License-Identifier: GPL-2.0
/*
* panel-ilitek-ili9488.c
* base on panel-orisetech-otm8009a.c
*
* Authors: zjm <https://github.com/zjm1060>
*/
#include <drm/drmP.h>
#include <drm/drm_mipi_dsi.h>
/*
* Ilitek ILI9488 TFT LCD drm_panel driver.
*
* This panel can be configured to support:
* - 6-bit serial RGB interface
* - 320x480 display
* - MIPI DSI SPI 3 line mode
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
@zjm1060
zjm1060 / scan.awk
Last active February 20, 2022 23:10
iw sacn.awk busybox
# iw wlan0 scan | sed -e 's#(on wlan# (on wlan#g' | awk -f scan.awk
BEGIN {
printf("%s|%s|%s|%s|%s|%s|%s|%s|%s|%s\n","MAC","SSID","freq","signal","sig%","WPA","WPA2","WEP","TKIP","CCMP");
}
NF > 0{
if ($1 == "BSS") {
if( $2 ~ /^[a-z0-9:]{17}$/ ) {
if( e["MAC"] ){
printf("%s|%s|%s|%s|%s|%s|%s|%s|%s|%s\n",e["MAC"],e["SSID"],e["freq"],e["sig"],e["sig%"],e["WPA"],e["WPA2"],e["WEP"],e["TKIP"],e["CCMP"]);
@zjm1060
zjm1060 / scan.awk
Created November 29, 2019 01:37 — forked from elecnix/scan.awk
Parse iw scan output
# iw wlan0 scan | sed -e 's#(on wlan# (on wlan#g' | awk -f scan.awk
$1 == "BSS" {
MAC = $2
print $2
e = wifi[MAC]
e["enc"] = "Open"
}
$1 == "SSID:" {
e = wifi[MAC]
e["SSID"] = $2
#!/bin/bash
# 作者:老徐
# SSR免费分享网站(所有帐号均来源于网上别人的分享):http://ss.pythonic.life
# 源代码主页:https://github.com/the0demiurge
# 访问https://github.com/the0demiurge/CharlesScripts/blob/master/charles/bin/ssr获取本脚本的最新版
# 使用方法:把该脚本放到$PATH里面并加入可执行权限就行(比如说放到/usr/local/bin)
# 首次使用输入ssr install后安装时会自动安装到 $HOME/.local/share/shadowsocksr
# 输入ssr config进行配置,输入JSON格式的配置文件
# 输入ssr uninstall卸载
# 输入ssr help 展示帮助信息
@zjm1060
zjm1060 / 2n-fft.c
Created January 16, 2019 02:43
2N点的实数傅里叶变换
#include <cstdio>
#include <cmath>
#include <complex>
#include <algorithm>
const int MaxL = 18, MaxN = 1 << MaxL;
typedef std::complex<double> complex_t;
complex_t eps[MaxL], eps_inv[MaxL], A[MaxN], B[MaxN];
void init_eps()
#ifndef ___MIXFFT_H
#define ___MIXFFT_H
#ifdef __cplusplus
extern "C" {
#endif
void fft(long n,float *xRe,float *xIm,float *yRe,float *yIm);
#ifdef __cplusplus
@zjm1060
zjm1060 / mixfft.c
Last active January 16, 2019 02:43
任意长度混合基FFT
// Copyright (c) 1996 Jens Jorgen Nielsen
// Written by Jens Jorgen Nielsen
// Optimizations by Janik Joire
//
// $History: $
#include <math.h>
#include <stdio.h>
#include <stdlib.h>