This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function! CloseEmptyBuffers() | |
| let buffers = filter(range(1, bufnr('$')), 'buflisted(v:val) && empty(bufname(v:val)) && bufwinnr(v:val)<0 && !getbufvar(v:val, "&mod")') | |
| if !empty(buffers) | |
| exe 'bw ' . join(buffers, ' ') | |
| endif | |
| endfunction | |
| command! CloseEmptyBuffers :call CloseEmptyBuffers() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ------------------------------------------------------------------------------------- | |
| -- 1) Copy this file anywhere, | |
| -- 2) Paste your options in "opts" | |
| -- 3) Source it with :source % | |
| -- | |
| -- If you get "unknown option" then remove it from opts and put it in "globals" | |
| -- | |
| -- checkopts() checks for values that already are defaults. Remove this function when you're done | |
| -- checkglobals() the same but for globals | |
| -- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: "3.8" | |
| volumes: | |
| mysql57: | |
| name: mysql57 | |
| mysql57conf: | |
| name: mysql57conf # docker run -it -v mysql57conf:/app --rm busybox | |
| services: | |
| db: # docker compose exec db mysql -u root -pasdf -e "create database if not exists laravel;" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| local on_windows = vim.loop.os_uname().version:match 'Windows' | |
| local function join_paths(...) | |
| local path_sep = on_windows and '\\' or '/' | |
| local result = table.concat({ ... }, path_sep) | |
| return result | |
| end | |
| vim.cmd [[set runtimepath=$VIMRUNTIME]] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| " I split my config into separate files so my real ~/.vimrc is just: | |
| " source ~/scripts/.vimrc | |
| " source ~/scripts/.vimrcplugins | |
| " Update everthing: | |
| " PlugUpgrade | |
| " PlugUpdate | |
| " CocUpdate | |
| scriptencoding utf-8 " basic | |
| set nocompatible " basic |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace App\Http\Controllers\Admin; | |
| use App\Http\Controllers\Controller; | |
| use App\Models\User; | |
| use Illuminate\Http\Request; | |
| use Storage; | |
| class UploadController extends Controller |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -bottom-0 | |
| -bottom-1 | |
| -bottom-10 | |
| -bottom-11 | |
| -bottom-12 | |
| -bottom-14 | |
| -bottom-16 | |
| -bottom-2 | |
| -bottom-20 | |
| -bottom-24 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <template> | |
| <div class=""> | |
| <input v-model="user" type="text" /> | |
| <input v-model="pass" type="password" /> | |
| <button @click="login">Login</button> | |
| <div class="">test: <button @click="test">test</button></div> | |
| <div class="">user: <button @click="whoami">whoami</button></div> | |
| <div class=""><button @click="logout">Logout</button></div> | |
| <div class=""> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # where's installed current version? | |
| which nvim | |
| # what's current version? | |
| nvim -v | |
| # make tmp folder | |
| mkdir -p ~/tmp | |
| cd ~/tmp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Example build script | |
| git clone https://github.com/neovim/neovim.git | |
| cd neovim | |
| make install | |
| mv build/bin/nvim /usr/local/bin/nvim05 | |
| # put this in your .zshrc or .bashrc | |
| alias v=/usr/local/bin/nvim05 | |
| alias nvim=/usr/local/bin/nvim05 |