Skip to content

Instantly share code, notes, and snippets.

View vn7n24fzkq's full-sized avatar

Casper vn7n24fzkq

  • Cycatena
  • Taiwan
  • 17:23 (UTC +08:00)
View GitHub Profile
@azagniotov
azagniotov / beautiful.rest.api.docs.in.markdown.md
Last active May 6, 2024 01:05
Example to create beautiful REST API docs in Markdown, inspired by Swagger API docs.
@kangchihlun
kangchihlun / usdt_erc20_transfer_demo.js
Last active October 25, 2023 11:21
usdt(erc20) transfer demo
// Created by Chih.Lun.Kang
// 網路上找的範例大部分都不能用,後來嘗試數次只有這方法可行
// 主網的appid => 539ab33xxxx,要去Infura申請,在上面建立一個project
// #### NOTE #### : 要特別注意本身轉帳的帳號要儲備足夠數量的 eth 跟 btc
// #### 注意 #### : 目前使用人工轉換儲值手續費,建議在幣價好的時候一次換匯才划算
const USDTJSON = require('./build/contracts/USDT.json')
const Web3 = require('web3')
const Tx = require('ethereumjs-tx').Transaction
@mrrusof
mrrusof / swap-capslock-control.reg
Created July 13, 2019 22:22
Swap left control and caps lock in Windows.
Windows Registry Editor Version 5.00
; The hex data is in five groups of four bytes:
; 00,00,00,00,\ header version (always 00000000)
; 00,00,00,00,\ header flags (always 00000000)
; 02,00,00,00,\ # of entries (2 in this case) plus a NULL terminator line.
; Entries are in 2-byte pairs: Key code to send & keyboard key to send it.
; Each entry is in LSB, MSB order.
; 1d,00,3a,00,\ Send LEFT CTRL (0x001d) code when user presses the CAPS LOCK key (0x003a)
; 3a,00,1d,00,\ Send CAPS LOCK (0x3A) code when user presses the LEFT CTRL key (0x001d)
@dteoh
dteoh / .gitconfig
Created March 17, 2019 23:40
Use Neovim as git mergetool
[merge]
tool = vimdiff
[mergetool]
keepBackup = false
[mergetool "vimdiff"]
cmd = nvim -d $LOCAL $REMOTE $MERGED -c '$wincmd w' -c 'wincmd J'
@kika
kika / flutter.vim
Created February 4, 2019 02:59
Flutter classes and types for Vim syntax highlighting in Dart. Add this to your `.vimrc`
augroup fl_dart
autocmd!
autocmd Syntax dart highlight default link dartFlutterClasses Type
autocmd Syntax dart highlight default link dartFlutterTypedefs Typedef
autocmd Syntax dart highlight default link dartFlutterExceptions Exception
autocmd Syntax dart highlight default link dartFlutterConstants Constant
autocmd Syntax dart highlight default link dartFlutterEnums Type
autocmd Syntax dart highlight default link dartFlutterMixins Type
autocmd Syntax dart syntax keyword dartFlutterMixins
\ AnimationEagerListenerMixin AnimationLazyListenerMixin
@qoomon
qoomon / conventional_commit_messages.md
Last active May 6, 2024 03:03
Conventional Commit Messages

Conventional Commit Messages

See how a minor change to your commit message style can make a difference.

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions and generate verion and changelogs

Commit Message Formats

Default

@MilesMcBain
MilesMcBain / rofi.cfg
Created July 17, 2018 02:19
vim like keys for rofi
rofi.kb-row-up: Up,Control+k,Shift+Tab,Shift+ISO_Left_Tab
rofi.kb-row-down: Down,Control+j
rofi.kb-accept-entry: Control+m,Return,KP_Enter
rofi.terminal: mate-terminal
rofi.kb-remove-to-eol: Control+Shift+e
rofi.kb-mode-next: Shift+Right,Control+Tab,Control+l
rofi.kb-mode-previous: Shift+Left,Control+Shift+Tab,Control+h
rofi.kb-remove-char-back: BackSpace
@abc873693
abc873693 / taiwan_districts.json
Last active March 26, 2024 03:40
台灣行政區郵遞區號 JSON
[
{
"districts": [
{
"zip": "100",
"name": "中正區"
},
{
"zip": "103",
"name": "大同區"
@Badel2
Badel2 / spectre.c
Last active March 12, 2023 00:18
Spectre attack example implementation
/* https://spectreattack.com/spectre.pdf */
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#ifdef _MSC_VER
#include <intrin.h> /* for rdtscp and clflush */
#pragma optimize("gt",on)
#else
#include <x86intrin.h> /* for rdtscp and clflush */
#endif