##file multi rename, regex pattern for commander
Search For : -(\d*)([-.]\w*.\w*)
Replace With : -${1}000${2}
| .moduletable_menu, .moduletable_menu ul { | |
| padding: 0; | |
| margin: 0; | |
| list-style: none; | |
| } | |
| .moduletable_menu a { | |
| display: block; | |
| width: 10em; | |
| } |
| ### PROMPT #################### | |
| function parse_git_dirty { | |
| [[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*" | |
| } | |
| function parse_git_branch { | |
| git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/" | |
| } |
| VIM regex | |
| Strip class attributes from HTML tags, including those spanning over multiple lines | |
| Change `class` word for anything else you want to strip.. | |
| :%s/<\s*\(\w*\)\s*class[^>]*>\([^<]\_.\{-}\)<\/.*>/<\1>\2<\/\1>/gc |
| function! CopyMatches(reg) | |
| let hits = [] | |
| %s//\=len(add(hits, submatch(0))) ? submatch(0) : ''/ge | |
| let reg = empty(a:reg) ? '+' : a:reg | |
| execute 'let @'.reg.' = join(hits, "\n") . "\n"' | |
| endfunction | |
| command! -register CopyMatches call CopyMatches(<q-reg>) |
| ### PROMPT #################### | |
| # function parse_git_dirty { | |
| # [[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*" | |
| # } | |
| # | |
| # function parse_git_branch { | |
| # git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/" | |
| # } | |
| # |
| echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
| . ~/.bashrc | |
| mkdir ~/local | |
| mkdir ~/node-latest-install | |
| cd ~/node-latest-install | |
| curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
| ./configure --prefix=~/local | |
| make install # ok, fine, this step probably takes more than 30 seconds... | |
| curl https://npmjs.org/install.sh | sh |
| { | |
| // The command to execute for the terminal, leave blank for the OS default | |
| // On OS X the terminal can be set to iTerm.sh to execute iTerm | |
| "terminal": "C:\\Windows\\System32\\cmd.exe", | |
| // A list of default parameters to pass to the terminal, this can be | |
| // overridden by passing the "parameters" key with a list value to the args | |
| // dict when calling the "open_terminal" or "open_terminal_project_folder" | |
| // commands | |
| "parameters": ["/c sh --login -i"] |
| [git-ftp] | |
| user = username | |
| url = domain.name/[public_html/or whatever] | |
| password = password | |
| add these lines in git repo configuration file, at the end |
| DROP TABLE IF EXISTS `#__mycomp_posts`; | |
| CREATE TABLE `#__mycomp_posts` ( | |
| `id` int(11) NOT NULL AUTO_INCREMENT, | |
| `title` varchar(250) NOT NULL, | |
| `body` TEXT NOT NULL DEFAULT '', | |
| PRIMARY KEY (`id`) | |
| ) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; |
##file multi rename, regex pattern for commander
Search For : -(\d*)([-.]\w*.\w*)
Replace With : -${1}000${2}