Skip to content

Instantly share code, notes, and snippets.

View IlyasDeckers's full-sized avatar
🎯
Focusing

Ilyas Deckers IlyasDeckers

🎯
Focusing
View GitHub Profile
@IlyasDeckers
IlyasDeckers / README.md
Created June 14, 2017 17:39 — forked from claytonrcarter/README.md
Share named routes between Laravel and Javascript

Share named routes between Laravel and Javascript

This is a 2-part technique to share named routes between Laravel and Javascript. It uses a custom artisan command to export your named routes to JSON, and a Javascript route() helper to lookup the route and fill in any parameters. Written for Laravel 5.3; not tested in 5.4.

Installation

1. Install RouteJson.php

Copy RouteJson.php into your app as app/Console/Commands/RouteJson.php

@IlyasDeckers
IlyasDeckers / nginx-naxsi.sh
Created May 15, 2017 19:07 — forked from dcnl1980/nginx-naxsi.sh
Nginx Naxsi (firewall) on Ubuntu 16.04
#!/usr/bin/env bash
apt-get install -y libpcre3 libpcre3-dev libssl-dev unzip make \
libgoogle-perftools-dev google-perftools jq
mkdir /tmp/ngxbuild
cd /tmp/ngxbuild
latestNginx=$(curl -s http://hg.nginx.org/nginx/tags |
grep "^ *release-" | head -1 | cut -c 9-)
latestNaxsi=$(curl -s https://api.github.com/repos/nbs-system/naxsi/releases |
jq -r .[].tag_name | grep -v rc | head -1)
@IlyasDeckers
IlyasDeckers / nginx-naxsi.sh
Created May 15, 2017 19:07 — forked from dcnl1980/nginx-naxsi.sh
Nginx Naxsi (firewall) on Ubuntu 16.04
#!/usr/bin/env bash
apt-get install -y libpcre3 libpcre3-dev libssl-dev unzip make \
libgoogle-perftools-dev google-perftools jq
mkdir /tmp/ngxbuild
cd /tmp/ngxbuild
latestNginx=$(curl -s http://hg.nginx.org/nginx/tags |
grep "^ *release-" | head -1 | cut -c 9-)
latestNaxsi=$(curl -s https://api.github.com/repos/nbs-system/naxsi/releases |
jq -r .[].tag_name | grep -v rc | head -1)