Skip to content

Instantly share code, notes, and snippets.

🏠
Working from own office

Sinan Eldem sineld

🏠
Working from own office
Block or report user

Report or block sineld

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jakebathman
jakebathman / logslaravel.sh
Created Aug 19, 2018
Tail Laravel logs and filter out the stack traces
View logslaravel.sh
tail -f -n 450 storage/logs/laravel*.log \
| grep -i -E \
"^\[\d{4}\-\d{2}\-\d{2} \d{2}:\d{2}:\d{2}\]|Next [\w\W]+?\:" \
--color
@calebporzio
calebporzio / HasUuid.php
Created Jul 5, 2018
A little trait to add to models that will have Uuids
View HasUuid.php
<?php
// Example usage in a model:
class ExampleModel extends Model
{
use HasUuid;
protected $primaryKey = 'uuid';
View test.bash
function ydl()
{
youtube-dl --extract-audio --audio-format mp3 "$@" --ignore-errors
}
# youtube-dl: https://rg3.github.io/youtube-dl/
# ornek: ydl "https://www.youtube.com/playlist?list=PL55713C70BA91BD6E"
@javymarmol
javymarmol / LC_CTYPE.txt
Created Nov 20, 2017
Centos warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
View LC_CTYPE.txt
vi /etc/environment
add these lines...
LANG=en_US.utf-8
LC_ALL=en_US.utf-8
@poul-kg
poul-kg / valet.conf
Last active Oct 4, 2019
CORS Rules for Laravel Valet Nginx
View valet.conf
# To enable CORS you should add lines with CORS rules below to your valet.conf file
# Find the file /usr/local/etc/nginx/valet/valet.conf - this is Valet conf for Nginx
# of try to execute `locate valet.conf` and find the `valet.coinf` in `nginx` subdirectory
# after you edit your valet.conf do not forget to execute `valet restart`
server {
listen 80 default_server;
root /;
charset utf-8;
client_max_body_size 128M;
@nckg
nckg / InputEdit.vue
Created Jun 13, 2017
Vue Inline edit
View InputEdit.vue
<template>
<div>
<span v-show="!editing"
@click="toggleEdit" v-html="showValue"></span>
<div v-show="editing" class="row">
<div class="col-md-10">
<div class="form-group">
<textarea class="form-control"
rows="3"
View AllowedUsernameValidator.php
<?php
# app/Validation/AllowedUsernameValidator.php
namespace App\Validation;
use Illuminate\Filesystem\Filesystem;
use Illuminate\Routing\Router;
use Illuminate\Config\Repository;
@ibrahimlawal
ibrahimlawal / LC_CTYPE.txt
Created Feb 27, 2017 — forked from jampajeen/LC_CTYPE.txt
Centos warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
View LC_CTYPE.txt
vi /etc/environment
add these lines...
LANG=en_US.utf-8
LC_ALL=en_US.utf-8
@santigarcor
santigarcor / Laravel PHP7 LEMP AWS.md
Last active Jun 15, 2018 — forked from santoshachari/Laravel PHP7 LEMP AWS.md
Laravel 5.x on Ubuntu 14.x, PHP 7.x, Nginx 1.9.x
View Laravel PHP7 LEMP AWS.md

#Steps to install latest Laravel, LEMP on AWS Ubuntu 14.4 version. This tutorial is the improvised verision of this tutorial on Digitalocean based on my experience.

Install PHP 7 on Ubuntu

Run the following commands in sequence.

sudo apt-get install -y language-pack-en-base
sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install zip unzip
@vluzrmos
vluzrmos / paginate.php
Created Jul 20, 2016
Laravel Paginate Collection or Array
View paginate.php
<?php
/**
* Gera a paginação dos itens de um array ou collection.
*
* @param array|Collection $items
* @param int $perPage
* @param int $page
* @param array $options
*
* @return LengthAwarePaginator
You can’t perform that action at this time.