Skip to content

Instantly share code, notes, and snippets.

View feilongfl's full-sized avatar

fei long feilongfl

View GitHub Profile
@feilongfl
feilongfl / kernel.cl
Last active November 22, 2023 22:51
opencl-minimal-demo
__kernel void add_one(__global int* data) {
int idx = get_global_id(0);
data[idx] += 1;
}
@feilongfl
feilongfl / check_wallpaper_programs.sh
Created July 11, 2023 11:58
确认是否安装了feh、nitrogen、hsetroot、xwallpaper、bgs、variety、pywal、xsetroot、habak和fim等壁纸程序
#!/bin/bash
programs=("feh" "nitrogen" "hsetroot" "xwallpaper" "bgs" "variety" "pywal" "xsetroot" "habak" "fim")
for program in "${programs[@]}"; do
if command -v "$program" &>/dev/null; then
echo "$program 已安装"
else
echo "$program 未安装"
fi
@feilongfl
feilongfl / getFile.sh
Last active September 17, 2022 07:39
parse webdav file list by libxml2
#!/usr/bin/env bash
curl -X PROPFIND -u jksv:jksv http://192.168.2.249:10000/JKSV/Ring%20Fit%20Adventure/
This file has been truncated, but you can view the full file.
execve("/usr/lib/beyondcompare/BCompare", ["/usr/lib/beyondcompare/BCompare"], 0x7ffeca45c0f0 /* 89 vars */) = 0
brk(NULL) = 0x2e82000
arch_prctl(0x3001 /* ARCH_??? */, 0x7ffe3e9d07a0) = -1 EINVAL (无效的参数)
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (没有那个文件或目录)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=277307, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 277307, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fefc2563000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/librt.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
@feilongfl
feilongfl / zuk.xml
Created September 21, 2021 21:55
Pixel Experience repo minifest for ZUK Z2pro
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote name="feilong-git" fetch="https://android_compile:zcyctv-Y5n-jSsVNd4Kx@git.f.lan/" />
<!-- <remote name="feilong-git" fetch="git@git.f.lan" /> -->
<!-- zuk z2 row -->
<project path="device/zuk/z2_row" remote="github" name="pe-zukz2/device_zuk_z2_row" revision="eleven" />
<project path="device/zuk/msm8996-common" remote="github" name="feilongfl/device_zuk_msm8996-common" revision="eleven" />
<!-- <project path="device/zuk/msm8996-common" remote="github" name="pe-zukz2/device_zuk_msm8996-common" revision="eleven" /> -->
<!-- <project path="device/zuk/msm8996-common" remote="feilong-git" name="embeded/android-phone/device_zuk_msm8996-common" revision="feilong-eleven-patch-68725" /> -->
@feilongfl
feilongfl / swap_make.fish
Created February 12, 2021 00:19
linux swap
#!/usr/bin/env fish
set swap_file /home/feilong/Program-ext/swap/swapfile
fallocate -l 100G $swap_file
chmod 600 $swap_file
mkswap $swap_file
swapon $swap_file
# swapoff -v $swap_file
function input(date,name1,name2){
this.date = date;
this.name1 = name1;
this.name2 = name2;
this.hash = name1 + name2;
}
inputdata = Array.of(new input(1, 'a', 'b'),new input(2, 'a', 'b'),new input(3, 'a', 'b'),new input(4, 'a', 'c'),new input(5, 'a', 'c'),new input(6, 'a', 'b'),new input(7, 'a', 'b'))
function result(name1,name2,hash,start,end){
@feilongfl
feilongfl / mouseSwitch.ahk
Last active October 12, 2019 23:34
make a mouse for two pos
#SingleInstance force
; global val define
global mouseSwitch = -1
; set pixel pos base on screen
CoordMode, Mouse, Screen
CoordMode, ToolTip, Screen
ai
ei
ui
ao
ou
iu
ie
ve
er
an
@feilongfl
feilongfl / fish_prompt.fish
Last active June 8, 2019 01:17
fish shell显示效果
function fish_prompt
# - green lines if the last return command is OK, red otherwise
# - your user name, in red if root or yellow otherwise
# - your hostname, in cyan if ssh or blue otherwise
# - the current path (with prompt_pwd)
# - date +%X
# - the current virtual environment, if any
# - the current git status, if any, with __fish_git_prompt
# - the current battery state, if any, and if your power cable is unplugged, and if you have "acpi"