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
sudo easytether-usb | |
acquired interface tun-easytether | |
dropped root privileges | |
now CONNECTING | |
now CONNECTED | |
switching to background | |
manuelgeek@manuelgeek:~$ systemctl enable systemd-networkd | |
Created symlink /etc/systemd/system/dbus-org.freedesktop.network1.service → /lib/systemd/system/systemd-networkd.service. | |
Created symlink /etc/systemd/system/multi-user.target.wants/systemd-networkd.service → /lib/systemd/system/systemd-networkd.service. | |
Created symlink /etc/systemd/system/sockets.target.wants/systemd-networkd.socket → /lib/systemd/system/systemd-networkd.socket. |
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
Listing items in tables is one of the ,ost essential while building dashboards. Datatables https://datatables.net/ Add advanced interaction controls | |
to your HTML tables which we mostly do on the client side. Using the same approach to load large rows of data from the database | |
always becomes slow as the data grows bigger and bigger untl at some point the datatable break. This is a major reason to | |
consider using datatables from the start of your development to avoid such. Thats what we are goint to do. | |
Create a new laravel project composer create-project --prefer-dist laravel/laravel datatable-test | |
change the .env for database connections | |
DB_CONNECTION=mysql | |
DB_HOST=127.0.0.1 | |
DB_PORT=3306 | |
DB_DATABASE=datatables-test |
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 | |
#API access key from Google API's Console | |
define( 'API_ACCESS_KEY', 'YOUR-SERVER-API-ACCESS-KEY-GOES-HERE' ); | |
$registrationIds = $_GET['id']; | |
#prep the bundle | |
$msg = array | |
( | |
'body' => 'Body Of Notification', |
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
/* | |
* Original script by: Shafiul Azam | |
* Version 4.0 | |
* Modified by: Luigi Balzano | |
* Description: | |
* Inserts Countries and/or States as Dropdown List | |
* How to Use: | |
In Head section: |
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.5.13 on 2017-09-28. | |
* | |
* @author Barry vd. Heuvel <[email protected]> | |
* @see https://github.com/barryvdh/laravel-ide-helper | |
*/ | |
namespace { | |
exit("This file should not be included, only analyzed by your IDE"); |
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
Replace your app\Exceptions\Handler.php render() function with this | |
/** | |
* Render an exception into an HTTP response. | |
* | |
* @param \Illuminate\Http\Request $request | |
* @param \Exception $exception | |
* @return \Illuminate\Http\Response | |
*/ | |
public function render($request, Exception $exception) | |
{ |
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
Quick tip for handling CSRF Token Expiration - common issue is when you use csrf protection is that if | |
a form sits there for a while (like a login form, but any the same) the csrf token in the form will | |
expire & throw a strange error. | |
Handling it is simple, and is a good lesson for dealing with other types of errors in a custom manner. | |
In Middleware you will see a file VerifyCsrfToken.php and be tempted to handle things there. DON'T! | |
Instead, look at your app/Exceptions/Handler.php, at the render($request, Exception $e) function. | |
All of your exceptions go through here, unless you have excluded them in the $dontReport array at the |
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; | |
use Auth; | |
use Config; | |
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
I was just watching a friend of mine work with git, and he'd always type all the git commands in full, like git status and git push. I realized that he must not be the only one to do so, so I decided to write this quick blog post and encourage everyone to create Huffman coded aliases for the most commonly used commands. Instead of typing git status, alias it to gs. Instead of git add, alias it to ga, etc. | |
Here are a bunch of aliases that I created for 99% of git commands I ever use: | |
alias ga='git add' | |
alias gp='git push' | |
alias gl='git log' | |
alias gs='git status' | |
alias gd='git diff' | |
alias gdc='git diff --cached' |
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
https://lukasmestan.com/install-mcrypt-extension-in-php7-2/ |