Skip to content

Instantly share code, notes, and snippets.

View nicoaudy's full-sized avatar

Nico Audy nicoaudy

View GitHub Profile
@nicoaudy
nicoaudy / weather.sh
Created July 1, 2019 04:10
Weather CLI
alias weather='curl -s wttr.in | sed -n "1,7p"'
alias weather_now="curl -s wttr.in | sed -n '1,7p'" #current weather
alias weather_today="curl -s wttr.in | sed -n '1,17p'" #weather today
alias weather_tommorow="curl -s wttr.in | sed -n '18,27p'" #weather tomorrow
alias weather_all="curl -s wttr.in | sed -n '1,38p'" #long weather.. all data
@nicoaudy
nicoaudy / cloudSettings
Last active March 20, 2020 02:58
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-03-20T02:58:29.355Z","extensionVersion":"v3.4.3"}
@nicoaudy
nicoaudy / settings.json
Last active May 1, 2019 04:42
vscode user setting
{
"workbench.colorTheme": "Slime",
"workbench.activityBar.visible": false,
"explorer.openEditors.visible": 0,
"workbench.statusBar.visible": false,
"editor.fontFamily": "Operator Mono",
"editor.fontSize": 13,
"editor.fontLigatures": true,
"editor.formatOnSave": true,
"editor.minimap.enabled": false,
@nicoaudy
nicoaudy / ApiController.php
Created April 27, 2019 08:00
trait for api
<?php
namespace App\Http\Traits;
use Illuminate\Http\Response;
trait ApiController {
/**
* @var int
*/
@nicoaudy
nicoaudy / BaseController.php
Created December 13, 2018 08:52 — forked from thepsion5/BaseController.php
Example of using A Laravel Controller to automatically handle validation exceptions and auth failures
<?php
class BaseController extends Controller
{
public function callAction($method, $params)
{
$ajax = Request::isAjax();
try {
return parent::callAction($method, $params);
@nicoaudy
nicoaudy / HandlePutFormData.php
Created December 13, 2018 08:41 — forked from Stunext/HandlePutFormData.php
Laravel: Middleware to support multipart/form-data in PUT, PATH and DELETE requests
<?php
namespace App\Http\Middleware;
use Closure;
use Symfony\Component\HttpFoundation\ParameterBag;
/**
* @author https://github.com/Stunext
*
@nicoaudy
nicoaudy / ctags.setup
Created November 10, 2018 01:25 — forked from nazgob/ctags.setup
ctags setup on mac
# you have ctags but it does not work...
$ ctags -R --exclude=.git --exclude=log *
ctags: illegal option -- R
usage: ctags [-BFadtuwvx] [-f tagsfile] file ...
#you need to get new ctags, i recommend homebrew but anything will work
$ brew install ctags
#alias ctags if you used homebrew
$ alias ctags="`brew --prefix`/bin/ctags"
@nicoaudy
nicoaudy / vim.md
Created September 17, 2018 08:42
Vim cheat set

Vim Commands Cheat Sheet

How to Exit

Command Description
:q[uit] Quit Vim. This fails when changes have been made.
:q[uit]! Quit without writing.
:cq[uit] Quit always, without writing.
@nicoaudy
nicoaudy / .vimrc
Created September 7, 2018 02:06
.vimrc ubuntu kantor
set nocompatible " be iMproved, required
filetype off " required <<========== We can turn it on later
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
@nicoaudy
nicoaudy / bash
Created March 21, 2018 04:25
composer error mismatch. make confusing. this is how to solved
composer config -g repo.packagist composer https://packagist.phpcomposer.com