Skip to content

Instantly share code, notes, and snippets.

Avatar
🖌️

windwp

🖌️
View GitHub Profile
@windwp
windwp / vimrc.min
Last active May 1, 2021
fern bug rename vim
View vimrc.min
if exists('+compatible') && &compatible
set nocompatible
endif
" Disable Vim's native pack feature
set packpath=
" Clone https://github.com/lambdalisue/fern.vim in somewhere
" and specify that directory to the below
"
@windwp
windwp / livereload.lua
Created Apr 18, 2021
livereload for plugin development on lua
View livereload.lua
#Neovim Trick
Live Reload on plugin development and init.lua
# Demo
# How
* [ ] code
@windwp
windwp / animation js
Last active May 4, 2021 — forked from ilblog/README.md
Create mp4 video from set of images in the browser client side, using ffmpeg.js in worker thread
View animation js
# 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`
View 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 Mar 11, 2021
telescope media preview
View media_preview.lua
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
View iterm.plist
<?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 Sep 4, 2020
vim_preview.sh
View 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 Aug 17, 2020
m_runner.sh
View 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│
View rofi-ag.sh
#!/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"
View rofi.txt
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.