Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Marian Pop mvpopuk

🏠
Working from home
View GitHub Profile
View Plugins.vim
" auto-install vim-plug
if empty(glob('~/.config/nvim/autoload/plug.vim'))
silent !curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
"autocmd VimEnter * PlugInstall
"autocmd VimEnter * PlugInstall | source $MYVIMRC
endif
call plug#begin('~/.config/nvim/autoload/plugged')
View I am not ready to publish them
" ------------------------------------ Vim Plug --------------------------------- "
source $HOME/.config/nvim/vim-plug/plugins.vim
" ------------------------------------ Mappings --------------------------------- "
nnoremap <SPACE> <Nop>
let mapleader = ' '
View route.php
Route::get('/', 'CustomersController@autocomplete');
Route::get('instantSearch', 'CustomersController@instantSearch');
View view.blade.php
<div id="app">
<auto-complete></auto-complete>
</div>
View CustomersController.php
public function autocomplete()
{
return view('panel.dashboard');
}
public function instantSearch(Request $request)
{
$customers = Customers::where('FirstName','LIKE',$request->instantSearch.'%')->get();
return response()->json($customers);
}
View AutoComplete.vue
<script>
Vue.component('autoComplete', {
template:
'<div>' +
'<div class="input-group float-right">' +
'<input type="text" ' +
'id="instantSearch" ' +
'v-model="instantSearch" ' +
'v-on:keyup="getSearchData" ' +
'class="form-control rounded-left border-right-0 font-italic" ' +
@mvpopuk
mvpopuk / ICS.php
Created May 11, 2018 — forked from jakebellacera/ICS.php
A convenient script to generate iCalendar (.ics) files on the fly in PHP.
View ICS.php
<?php
/**
* ICS.php
* =======
* Use this class to create an .ics file.
*
* Usage
* -----
* Basic usage - generate ics file contents (see below for available properties):