Skip to content

Instantly share code, notes, and snippets.

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

windwp

💭
I may be slow to respond.
  • VietNam
View GitHub Profile
@windwp
windwp / livereload.lua
Created April 18, 2021 06:34
livereload for plugin development on lua
#Neovim Trick
Live Reload on plugin development and init.lua
# Demo
# How
* [ ] code
@windwp
windwp / animation js
Last active May 4, 2021 07:26 — forked from ilblog/README.md
Create mp4 video from set of images in the browser client side, using ffmpeg.js in worker thread
# Inspiration
* https://semisignal.com/tag/ffmpeg-js/
* https://github.com/antimatter15/whammy
ffmeg as worker can be found at https://github.com/Kagami/ffmpeg.js/
Final build can be obtained via `wget https://unpkg.com/ffmpeg.js@3.1.9001/ffmpeg-worker-mp4.js`
@windwp
windwp / run_tmux.sh
Created March 12, 2021 01:36
run_tmux.sh
#! /bin/sh
docker-compose up &
sleep 4
echo "running"
panel_1=$(tmux split-window -P -F "#{pane_id}")
tmux send -t ${panel_1} "cd ./pi1/" C-m
tmux send -t ${panel_1} "python3 main.py" C-m
@windwp
windwp / media_preview.lua
Last active April 25, 2023 21:00
telescope media preview
local utils = require('telescope.utils')
local defaulter = utils.make_default_callable
local actions = require('telescope.actions')
local finders = require('telescope.finders')
local make_entry = require('telescope.make_entry')
local pickers = require('telescope.pickers')
local previewers = require('telescope.previewers')
local builtin = require('telescope.builtin')
local conf = require('telescope.config').values
local flatten = vim.tbl_flatten
@windwp
windwp / iterm.plist
Created September 8, 2020 11:34
tmux.theme.conf
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AllowClipboardAccess</key>
<true/>
<key>AlternateMouseScroll</key>
<true/>
<key>AppleAntiAliasingThreshold</key>
<integer>1</integer>
@windwp
windwp / vim_preview.sh
Last active September 4, 2020 02:10
vim_preview.sh
#!/bin/bash
path=$@
IFS=':' read -r -a array <<< "$path"
file=${array[0]}
start=$((${array[1]} - 1 ))
end=$((${array[1]} + 5))
file=${file/\~/$HOME}
line=${array[2]}
bat $file -r $start:$end -H ${array[1]} --color always --decorations never
@windwp
windwp / m_runner.sh
Last active August 17, 2020 18:15
m_runner.sh
#!/bin/bash
# use it for continue running application
# similar entr
# if you want to use swallow function you need to install
# https://github.com/windwp/i3-master-stack
# https://github.com/windwp/i3-master-stack/blob/master/swallow
#┌──────────┐
#│vim script│
#!/bin/bash
# use AG search with rofi
#
#------------ CONFIG ----------------#
# It support search text in symlink folder so you can add your symlink to this folder
SEARCH_DIRECTORY="$HOME/Desktop"
DIRECTORY_SHORTCUT=(
"~/Downloads"
"~/Documents"
@windwp
windwp / rofi.txt
Created July 16, 2020 01:45
rofi gist
rofi usage:
rofi [-options ...]
Command line only options:
-no-config Do not load configuration, use default values.
-v,-version Print the version number and exit.
-dmenu Start in dmenu mode.
-display [string] X server to contact.
${DISPLAY}
-h,-help This help message.
@windwp
windwp / keybinding.json
Last active July 16, 2020 03:44
auto code
// Place your key bindings in this file to override the defaultsauto[]
[
{
"key": "alt+b",
"command": "workbench.action.navigateToLastEditLocation"
},
{
"key": "ctrl+k ctrl+q",
"command": "-workbench.action.navigateToLastEditLocation"
},