Skip to content

Instantly share code, notes, and snippets.

@nicks9188
nicks9188 / LC_CTYPE.md
Created May 6, 2019 13:51
Centos warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
  1. vi /etc/environment

add these lines...

LANG=en_US.utf-8
LC_ALL=en_US.utf-8

Alternatively,

function sendTelegramNotify() {
var token = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'; // ใส่ Telegram bot token
var chatId = 'xxxxxxxxxx'; // ใส่ chat ID
var message = 'ข้อความที่คุณต้องการส่ง'; // ข้อความที่จะส่ง
var telegramUrl = 'https://api.telegram.org/bot' + token + '/sendMessage';
var payload = {
'chat_id': chatId,
@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active May 10, 2025 05:55
Conventional Commits Cheatsheet

Conventional Commit Messages starline

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

Tip

Take a look at git-conventional-commits , a CLI util to ensure these conventions, determine version and generate changelogs

Commit Message Formats

Default

@dropmeaword
dropmeaword / browser_history.md
Last active May 10, 2025 05:52
Playing around with Chrome's history

Browser histories

Unless you are using Safari on OSX, most browsers will have some kind of free plugin that you can use to export the browser's history. So that's probably the easiest way. The harder way, which seems to be what Safari wants is a bit more hacky but it will also work for other browsers. Turns out that most of them, including Safari, have their history saved in some kind of sqlite database file somewhere in your home directory.

The OSX Finder cheats a little bit and doesn't show us all the files that actually exist on our drive. It tries to protect us from ourselves by hiding some system and application-specific files. You can work around this by either using the terminal (my preferred method) or by using the Cmd+Shft+G in Finder.

Finder

Once you locate the file containing the browser's history, copy it to make a backup just in case we screw up.

GitHub Search Syntax for Finding API Keys/Secrets/Tokens

As a security professional, it is important to conduct a thorough reconnaissance. With the increasing use of APIs nowadays, it has become paramount to keep access tokens and other API-related secrets secure in order to prevent leaks. However, despite technological advances, human error remains a factor, and many developers still unknowingly hardcode their API secrets into source code and commit them to public repositories. GitHub, being a widely popular platform for public code repositories, may inadvertently host such leaked secrets. To help identify these vulnerabilities, I have created a comprehensive search list using powerful search syntax that enables the search of thousands of leaked keys and secrets in a single search.

Search Syntax:

(path:*.{File_extension1} OR path:*.{File_extension-N}) AND ({Keyname1} OR {Keyname-N}) AND (({Signature/pattern1} OR {Signature/pattern-N}) AND ({PlatformTag1} OR {PlatformTag-N}))

Examples:

**1.

@AveYo
AveYo / . Pitch Black Theme.reg
Last active May 10, 2025 05:44
Pitch Black Theme.reg - now for Ctrl+Alt+Del (and logon on 11) as well - revised 2022-06-16
Windows Registry Editor Version 5.00
; Pitch Black Theme preset by AveYo, AccentPalette idea by /u/Egg-Tricky
; for Ctrl+Alt+Del, Logon, Taskbar, Start Menu, Action Center (10 & 11)
; revised 2022-06-16: show active taskbar button in accent color
[-HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Accent]
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Accent]
"AccentColorMenu"=dword:aa000000 ; Window borders and titlebar
"StartColorMenu"=dword:aa202020 ; Modals in UWP ex. Apply new refresh rate in 10
@krowe
krowe / Add_hidden_dot_items_to_context_menu.reg
Last active May 10, 2025 05:41
These add a menu to Windows Explorer which shows or hides hidden files. It also will add menu items which show and hides protected system files. You can optionally also add menus for showing and hiding files which begin with a dot in the current folder.
Windows Registry Editor Version 5.00
; Created by: Kevin Rowe
; Created on: December 9, 2021
; Based on work by (you will probably want to install his script to work along with this script):
; Created by: Shawn Brink
; Tutorial: https://www.tenforums.com/tutorials/75901-hidden-items-add-context-menu-windows-10-a.html
[HKEY_CLASSES_ROOT\Directory\Background\shell\HiddenFiles]
@sshh12
sshh12 / cursor-agent-system-prompt.txt
Last active May 10, 2025 05:39
Cursor Agent System Prompt (March 2025)
You are a powerful agentic AI coding assistant, powered by Claude 3.5 Sonnet. You operate exclusively in Cursor, the world's best IDE.
You are pair programming with a USER to solve their coding task.
The task may require creating a new codebase, modifying or debugging an existing codebase, or simply answering a question.
Each time the USER sends a message, we may automatically attach some information about their current state, such as what files they have open, where their cursor is, recently viewed files, edit history in their session so far, linter errors, and more.
This information may or may not be relevant to the coding task, it is up for you to decide.
Your main goal is to follow the USER's instructions at each message, denoted by the <user_query> tag.
<communication>
1. Be conversational but professional.
@rohanbari
rohanbari / .vimrc
Last active May 10, 2025 05:38
My configuration of vimrc file for coding
syntax on " Enable syntax highlighting
set autoindent " Maintain indentation from previous line
set smartindent " Apply smart indentation rules
set expandtab " Use spaces instead of tabs
set shiftwidth=4 " Set indentation width to 4 spaces
set tabstop=4 " Tabs appear as 4 spaces
set number " Show line numbers
@BobbyWibowo
BobbyWibowo / genshinimpact-3120x1440.json
Last active May 10, 2025 05:34
QtScrcpy custom key maps for Genshin Impact.
{
"switchKey": "Key_QuoteLeft",
"mouseMoveMap": {
"startPos": {
"x": 0.5,
"y": 0.32
},
"speedRatio": 3.5
},
"keyMapNodes": [