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
-- Check requirements | |
local all_requirements = 1 | |
for _, requirement in ipairs({ "git", "rg", "node", "npm" }) do | |
if vim.fn.executable(requirement) == 0 then | |
print("plugins require " .. requirement) | |
all_requirements = 0 | |
end | |
end | |
if all_requirements == 0 then |
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
# run ubuntu in docker | |
docker run -it --rm --name myubuntu ubuntu:latest | |
## requirements | |
apt update | |
apt -y install software-properties-common dirmngr apt-transport-https lsb-release ca-certificates build-essential git ripgrep nodejs npm | |
## add neovim | |
add-apt-repository ppa:neovim-ppa/stable -y | |
apt update |
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=""> |