Skip to content

Instantly share code, notes, and snippets.

@bnse
bnse / tmux.conf
Created June 2, 2025 15:51 — forked from adibhanna/tmux.conf
Tmux config
#--------------------------------------------------------------------------
# Configuration
#--------------------------------------------------------------------------
# Use Vi mode
setw -g mode-keys vi
# Increase scrollback buffer size
set -g history-limit 10000
@bnse
bnse / gist:ea39f8ae42f05fd3ed878ee6766a724a
Created July 12, 2024 15:55 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@bnse
bnse / gen-certs.sh
Created September 17, 2023 23:03 — forked from notmedia/gen-certs.sh
Creating Self-Signed certificates
rm *.pem
rm *.srl
rm *.cnf
# 1. Generate CA's private key and self-signed certificate
openssl req -x509 -newkey rsa:4096 -days 365 -nodes -keyout ca-key.pem -out ca-cert.pem -subj "/C=FR/ST=Occitanie/L=Toulouse/O=Test Org/OU=Test/CN=*.test/[email protected]"
echo "CA's self-signed certificate"
openssl x509 -in ca-cert.pem -noout -text
@bnse
bnse / compile_flags.txt
Created May 25, 2023 10:06
on macos not found the luaxlib.h
-xc
-I
/usr/local/Cellar/lua/5.4.5/include/lua
@bnse
bnse / ToggleAutoComplete.md
Created May 25, 2023 01:43
Toggle nvim-cmp AutoComplete

Toggle nvim-cmp AutoComplete function

local cmp_enabled = true
vim.api.nvim_create_user_command("ToggleAutoComplete", function()
	if cmp_enabled then
		require("cmp").setup.buffer({ enabled = false })
		cmp_enabled = false
	else
 require("cmp").setup.buffer({ enabled = true })
# Reconstructed via infocmp from file: /usr/share/terminfo/t/tmux-256color
tmux-256color|tmux with 256 colors,
OTbs, OTpt, am, hs, km, mir, msgr, xenl, AX, G0,
colors#256, cols#80, it#8, lines#24, pairs#32767, U8#1,
acsc=++\,\,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[?25l,
clear=\E[H\E[J, cnorm=\E[34h\E[?25h, cr=^M,
csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H,
cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C,
cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\EM,
{
"name": "react-learning",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
@bnse
bnse / App.js
Created October 7, 2022 19:09
change array to array object
import './App.css'
import MapList from './MapList'
const people = [
'string 1',
'string 2',
'string 3',
'string 4',
'string 5',
'string 6',
@bnse
bnse / gist:631c070baee6d08bd75465e2fed0371d
Created October 7, 2022 17:14
change array to array[object]
const people = [
'string 1',
'string 2',
'string 3',
'string 4',
'string 5',
'string 6',
]
let peopleObj = []
@bnse
bnse / set-timezone.md
Created September 8, 2021 09:11
set timezone on ubuntu

set-timezone on ubuntu

Show current timezone status:

$ timedatectl show

Timezone=Asia/Shanghai
LocalRTC=no
CanNTP=yes