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; | |
use Illuminate\Http\Request; | |
trait RestControllerTrait { | |
public function index() { | |
$model = self::MODEL; |
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 | |
/** | |
* A helper file for Laravel 5, to provide autocomplete information to your IDE | |
* Generated for Laravel 5.1.31 (LTS) on 2016-03-01. | |
* | |
* @author Barry vd. Heuvel <[email protected]> | |
* @see https://github.com/barryvdh/laravel-ide-helper | |
*/ | |
namespace { |
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
#!/bin/sh | |
curl -X DELETE 'localhost:9200/i/' | |
curl -X POST 'localhost:9200/i/' -d '{ | |
"settings" : { | |
"analysis" : { | |
"analyzer" : { | |
"crazy" : { | |
"type" : "custom", |
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 ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ %s)" | |
PROMPT=' | |
%{$fg_bold[yellow]%}%! =>%{$reset_color%} %{$fg_bold[white]%}%*%{$reset_color%} : %{$fg_bold[red]%}%n%{$reset_color%} %{$fg_bold[yellow]%}@%{$reset_color%} %{$fg_bold[cyan]%}%M%{$reset_color%} %{$fg_bold[yellow]%}${PWD/#$HOME/~}% %{$fg_bold[blue]%} $(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' | |
ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})" |
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 | |
require __DIR__ . '/vendor/autoload.php'; | |
use GuzzleHttp\Client; | |
use GuzzleHttp\HandlerStack; | |
use GuzzleHttp\Handler\CurlFactory; | |
use GuzzleHttp\Handler\CurlHandler; | |
use GuzzleHttp\Handler\CurlMultiHandler; | |
use GuzzleHttp\Handler\EasyHandle; |
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
#!/bin/bash | |
# | |
# ############################################################################# | |
# Create new SSH user (Ubuntu) | |
# 1) Download the "raw" with - wget -O createNewSSHUser.sh | |
# 2) Make it executable with - chmod a+x createNewSSHUser.sh | |
# 5) Immediately set a new password by logging in once with - | |
# su newUsrName | |
# ############################################################################# | |
# |
Sublime Text includes a command line tool, subl
, to work with files on the command line. This can be used to open files and projects in Sublime Text, as well working as an EDITOR for unix tools, such as git and subversion.
- Sublime text 2 or 3 installed in your system within
Applications
folder
Setup
CloudFlare is an awesome reverse cache proxy and CDN that provides DNS, free HTTPS (TLS) support, best-in-class performance settings (gzip, SDCH, HTTP/2, sane Cache-Control
and E-Tag
headers, etc.), minification, etc.
- Make sure you have registered a domain name.
- Sign up for CloudFlare and create an account for your domain.
- In your domain registrar's admin panel, point the nameservers to CloudFlare's (refer to this awesome list of links for instructions for various registrars).
- From the CloudFlare settings for that domain, enable HTTPS/SSL and set up a Page Rule to force HTTPS redirects. (If you want to get fancy, you can also enable automatic minification for text-based assets [HTML/CSS/JS/SVG/etc.], which is a pretty cool feature if you don't want already have a build step for minification.)
- If you
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
2018-05-23T09:00:29+0000 [10.10.0.100::192.168.99.1][]:[DEBUG][799.9999][POST http://api.local:8080/cart/order-69a2397b-e6d3-4967-bd22-706c4c19daa2/coupon/cap800][PostmanRuntime/7.1.1][][5105008][0] | |
2018-05-23T09:00:29+0000 [10.10.0.100::192.168.99.1][]:[DEBUG][799.9999][POST http://api.local:8080/cart/order-69a2397b-e6d3-4967-bd22-706c4c19daa2/coupon/cap800][PostmanRuntime/7.1.1][][5104944][0] | |
2018-05-23T09:04:49+0000 [10.10.0.100::192.168.99.1][]:[ERROR][Call to undefined function PHPSTORM_META\type()][POST http://api.local:8080/cart/order-69a2397b-e6d3-4967-bd22-706c4c19daa2/coupon/cap800][PostmanRuntime/7.1.1][][4911344][0] #0 /var/www/api/vendor/src/Base/Order/CartOrderAttributeTrait.php(1305): Base\Order\CartModel->calculateTotal() #1 /var/www/api/vendor/src/Base/Order/CartOrderAttributeTrait.php(2047): Base\Order\CartModel->collectTotals() #2 /var/www/api/vendor/src/Base/Order/CartOrderAttributeTrait.php(992): Base\Order\CartModel->collectTotal() #3 /var/www/api/vendor/src/Base/Order/CartModel.php(221) |
OlderNewer