Skip to content

Instantly share code, notes, and snippets.

View lf-wxp's full-sized avatar
🎯
Focusing

xiaoping wu lf-wxp

🎯
Focusing
View GitHub Profile
_ = (
255,
lambda
V ,B,c
:c and Y(V*V+B,B, c
-1)if(abs(V)<6)else
( 2+c-4*abs(V)**-0.4)/i
) ;v, x=1500,1000;C=range(v*x
);import struct;P=struct.pack;M,\
j ='<QIIHHHH',open('M.bmp','wb').write
@lf-wxp
lf-wxp / vimawesome.vim
Created February 28, 2018 07:54 — forked from junegunn/vimawesome.vim
Plugin completion using VimAwesome API
" ----------------------------------------------------------------------------
" vimawesome.com
" ----------------------------------------------------------------------------
function! VimAwesomeComplete() abort
let prefix = matchstr(strpart(getline('.'), 0, col('.') - 1), '[.a-zA-Z0-9_/-]*$')
echohl WarningMsg
echo 'Downloading plugin list from VimAwesome'
echohl None
ruby << EOF
require 'json'
parse_git_branch ()
{
local GITDIR=`git rev-parse --show-toplevel 2>&1` # Get root directory of git repo
if [[ "$GITDIR" != '/Users/shreyas' ]] # Don't show status of home directory repo
then
# Figure out the current branch, wrap in brackets and return it
local BRANCH=`git branch 2>/dev/null | sed -n '/^\*/s/^\* //p'`
if [ -n "$BRANCH" ]; then
echo -e "[$BRANCH]"
fi
In powershell
set-executionpolicy remotesigned
In download color theme folder
.\Install-ConEmuTheme.ps1 -ConfigPath D:\cmder\config\ConEmu.xml -Operation Add -ThemePathOrName themes\oceans16-dark.xml
@lf-wxp
lf-wxp / git-reset-author.sh
Created February 19, 2022 11:23 — forked from bgromov/git-reset-author.sh
Git: reset author for ALL commits
#!/bin/sh
# Credits: http://stackoverflow.com/a/750191
git filter-branch -f --env-filter "
GIT_AUTHOR_NAME='Newname'
GIT_AUTHOR_EMAIL='new@email'
GIT_COMMITTER_NAME='Newname'
GIT_COMMITTER_EMAIL='new@email'
" HEAD