Skip to content

Instantly share code, notes, and snippets.

View akkuman's full-sized avatar
💭
I may be slow to respond.

akkuman

💭
I may be slow to respond.
View GitHub Profile
@akkuman
akkuman / 1555826334.txt
Created December 5, 2023 08:42 — forked from gastonfeng/1555826334.txt
PPA 镜像加速
PPA 镜像加速
2018年7月26日 BY : TATERLI
这里有USTC的反向代理.
https://lug.ustc.edu.cn/wiki/mirrors/help/revproxy
只要一句话,全替换成USTC加速的PPA.再也不担心了.
1
sudo find /etc/apt/sources.list.d/ -type f -name "*.list" -exec  sed  -i.bak -r  's#deb(-src)?\s*http(s)?://ppa.launchpad.net#deb\1 http\2://launchpad.proxy.ustclug.org#ig' {} \;
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\InputMethod\Settings\CHS]
"LangBar Force On"=dword:00000000
"Enable Double Pinyin"=dword:00000001
"EmoticonTipTriggerCount"=dword:00000001
"HapLastDownloadTime"=hex(b):eb,69,29,59,00,00,00,00
"UserDefinedDoublePinyinScheme0"="小鹤双拼*2*^*iuvdjhcwfg xmlnpbksqszxkrltvyovt"
"DoublePinyinScheme"=dword:0000000a
"UDLLastUpdatedTime"="2019-05-08 09:30:00"
"UDLCount"=dword:0000018b
@akkuman
akkuman / 00_copy_key.lua
Created March 27, 2023 07:11 — forked from itamarhaber/00_copy_key.lua
The fastest, type-agnostic way to copy a Redis key, as discussed in https://redislabs.com/blog/the-7th-principle-of-redis-we-optimize-for-joy
-- @desc: The fastest, type-agnostic way to copy a Redis key
-- @usage: redis-cli --eval copy_key.lua <source> <dest> , [NX]
local s = KEYS[1]
local d = KEYS[2]
if redis.call("EXISTS", d) == 1 then
if type(ARGV[1]) == "string" and ARGV[1]:upper() == "NX" then
return nil
else
@akkuman
akkuman / ramblings.md
Created July 3, 2022 12:57 — forked from slimsag/ramblings.md
Because cross-compiling binaries for Windows is easier than building natively

Because cross-compiling binaries for Windows is easier than building natively

I want Microsoft to do better, want Windows to be a decent development platform-and yet, I constantly see Microsoft playing the open source game: advertising how open-source and developer friendly they are - only to crush developers under the heel of the corporate behemoth's boot.

The people who work at Microsoft are amazing, kind, talented individuals. This is aimed at the company's leadership, who I feel has on many occassions crushed myself and other developers under. It's a plea for help.

The source of truth for the 'open source' C#, C++, Rust, and other Windows SDKs is proprietary

You probably haven't heard of it before, but if you've ever used win32 API bindings in C#, C++, Rust, or other languages, odds are they were generated from a repository called microsoft/win32metadata.

@akkuman
akkuman / cgo.md
Created April 18, 2022 09:08 — forked from zchee/cgo.md
cgo convert list

See also, http://libraryofalexandria.io/cgo/

Using Go cgo

cgo has a lot of trap.
but Not "C" pkg also directory in $GOROOT/src. IDE's(vim) Goto command not works.

So, Here collect materials.

@akkuman
akkuman / enum_heaps.c
Created September 16, 2021 15:14 — forked from reinsteam/enum_heaps.c
Sample code of heap enumeration without using Tool Help functions <tlhelp32.h>
#ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
#endif
#pragma warning (push)
/* 4820: '<struct-name>' : 'n' bytes padding added after data member '<member-name>'*/
# pragma warning (disable : 4820)
# include <windows.h>
# include <stdio.h>
@akkuman
akkuman / dllmain.go
Created August 13, 2021 11:05 — forked from NaniteFactory/dllmain.go
An implementation example of DllMain() entrypoint with Golang. $ go build --buildmode=c-shared -o my.dll && rundll32.exe my.dll Test
package main
//#include "dllmain.h"
import "C"
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
#__author__ == Tr3jer_CongRong
import re
import sys
import time
import threading
import dns.resolver
@akkuman
akkuman / fofa_rule.sql
Created March 15, 2018 09:03 — forked from Tr3jer/fofa_rule.sql
fofa_rule.sql
/*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 50542
Source Host : localhost
Source Database : rule
Target Server Type : MySQL