Skip to content

Instantly share code, notes, and snippets.

View MrNegativeTW's full-sized avatar
🍤
蝦蝦

Trevor MrNegativeTW

🍤
蝦蝦
View GitHub Profile
@MrNegativeTW
MrNegativeTW / README.md
Created February 28, 2024 00:06
Find filenames certain characters and move the file to it's folder

Fuck Windows

Find filenames certain characters and move the file to it's folder

@MrNegativeTW
MrNegativeTW / main.py
Last active November 28, 2022 00:26
PAX S300 Credit Card Machine Code Snippet (Python)
# https://stackoverflow.com/questions/66783581/converting-a-string-to-hex-in-python-3
def calc_for_lrc(input: str):
"""
Calculate XOR for [DATA LENGTH] + [DATA] + [ETX]
"""
# input_example = 'I220001 01 000000000100 123456 '
input = '000' + str(len(input)) + input
input = str.encode(input)
input = hexlify(input)
@MrNegativeTW
MrNegativeTW / README.md
Created March 21, 2022 09:11
Line macOS folder location

~/Library/Containers/jp.naver.line.mac

@MrNegativeTW
MrNegativeTW / README.md
Last active July 3, 2021 14:56
TP-Link Archer C7 V2

TP-Link C7 V2

Some test of this machine. Running OpenWrt.

  • Network performance test
  • iw phy command output

Network performance test

Router: TP-Link C7 V2 AC1750

@MrNegativeTW
MrNegativeTW / README.md
Last active April 3, 2024 10:50
XAMPP MySQL Crash again? Here is the soluation.

Fix MySQL after reinstall XAMPP

Environment

You are using...

  • Windows
  • XAMPP
  • PHPMyAdmin

Situation

  1. You want to continue your work from yesterday
@MrNegativeTW
MrNegativeTW / TaiwanCCTVSource.md
Last active December 11, 2020 02:20
台灣道路即時影像來源 CCTV

地圖查詢

公路總局 - 智慧化省道即時資訊服務網


資料來源

可從 Developer Console 中 Network 面板取得 API 路徑

省道即時影像

使用 resolution 可統一固定影像大小,有些影像畫質本身比較好,用這個會限縮畫質,需留意

@MrNegativeTW
MrNegativeTW / ImgurApiService.kt
Last active May 5, 2024 11:09
Retrofit 2 Kotlin Example, Imgur upload image example.
package com.your.packagename
import com.txwstudio.app.roadreport.json.imgurupload.ImgurUploadJson
import okhttp3.MultipartBody
import okhttp3.OkHttpClient
import retrofit2.Call
import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory
import retrofit2.http.Header
import retrofit2.http.Multipart
@MrNegativeTW
MrNegativeTW / Awesome-List.md
Last active January 2, 2021 10:57
Awesome macOS Apps

A collection of some awesome macOS apps.

Personal Preferences

Install: brew cask install hiddenbar
幫你把 Menu Bar 上用不到的圖標藏起來

Install: App Store
視窗排列

@MrNegativeTW
MrNegativeTW / C7V2_iw_phy.txt
Last active September 15, 2021 13:48
TP-Link Archer C7 V2 - iw phy command
root@OpenWrt:~# iw phy
Wiphy phy1
max # scan SSIDs: 4
max scan IEs length: 2257 bytes
max # sched scan SSIDs: 0
max # match sets: 0
max # scan plans: 1
max scan plan interval: -1
max scan plan iterations: 0
Retry short limit: 7
@MrNegativeTW
MrNegativeTW / box-shadow.css
Last active September 8, 2019 05:04
[CSS] Awesome Box-Shadow.
/* From Macbed/AppKed */
.card {
box-shadow: 0 20px 40px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.1)
}
/* From cht.com */
.card {
border-radius: .8rem;
/* -webkit-box-shadow: 0 0.2rem 0.4rem rgba(0, 0, 0, 0.13); */
box-shadow: 0 0.2rem 0.4rem rgba(0, 0, 0, 0.13);