Skip to content

Instantly share code, notes, and snippets.

View RunThem's full-sized avatar
🎯
专注

iccy RunThem

🎯
专注
View GitHub Profile
@RunThem
RunThem / trash.sh
Created September 25, 2023 09:35
Simple implementation of linux `rm`
#!/usr/bin/env bash
root_path=~/.local/share/Trash
prefix=`LANG=us date '+%y-%m-%d-%H-%M-'`
for file in ${@}; do
mv ${file} ${root_path}/${prefix}`basename ${file}`
done
@RunThem
RunThem / xmake.lua
Created September 25, 2023 09:22
xmake tests simple code
local project = 'alloc'
local file = project .. '.c'
local code = [[
#include <mimalloc.h>
#include <stdio.h>
#include <errno.h>
int main(void) {
printf("errno is %d\n", errno);