I hereby claim:
- I am joecampo on github.
- I am joecampo (https://keybase.io/joecampo) on keybase.
- I have a public key whose fingerprint is BE87 7907 C11D EA45 7120 8144 ABC0 6655 C6EC 6C65
To claim this, I am signing this object:
<?php | |
namespace App\Console\Commands; | |
use Illuminate\Console\Command; | |
use Illuminate\Console\Concerns\CallsCommands; | |
use Illuminate\Support\Facades\Http; | |
use Laravel\Forge\Forge; | |
use Laravel\Forge\Resources\Daemon; |
# Rename tags named foo-bar-#.#.# to v#.#.# and push the tag changes | |
git tag -l | while read t; do n="v${t##*-}"; git tag $n $t; git push --tags ; git tag -d $t; git push origin :refs/tags/$t ; done |
<?php | |
Builder::macro('deferredPaginate', function ($perPage = null, $columns = ['*'], $pageName = 'page', $page = null) { | |
$model = $this->newModelInstance(); | |
$key = $model->getKeyName(); | |
$table = $model->getTable(); | |
$paginator = $this->clone() | |
// We don't need them for this query, they'll remain | |
// on the query that actually gets the records. |
// If you're using typescript or ts-check you can alias the composition api package as well: | |
{ | |
"compilerOptions": { | |
// … other stuff omitted for brevity … | |
// Ensure your base url is set | |
"baseUrl": ".", | |
"paths": { | |
// Add composition API to your compiler options and alias it to the vue 3 install | |
// The path is relative to `baseUrl` above |
#!/bin/bash | |
xset s noblank | |
xset s off | |
xset -dpms | |
unclutter -idle 0.5 -root & | |
sed -i 's/"exited_cleanly":false/"exited_cleanly":true/' /home/pi/.config/chromium/Default/Preferences | |
sed -i 's/"exit_type":"Crashed"/"exit_type":"Normal"/' /home/pi/.config/chromium/Default/Preferences |
#!/bin/bash | |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test | |
sudo apt-get update | |
sudo -i export CPPFLAGS="-DSIZEOF_LONG_INT=8" | |
sudo apt-get -y install gcc-5 g++-5 | |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 60 --slave /usr/bin/g++ g++ /usr/bin/g++-5 | |
cd ~ | |
echo "Configuring the unixODBC 2.3.1 Driver Manager" |
I hereby claim:
To claim this, I am signing this object:
If you're not familiar: What is fail2ban? fail2ban is an awesome linux service/monitor that scans log files (e.g. auth.log for SSH) for potentially malicious behavior. Once fail2ban is tripped it will ban users for a specified duration by adding rules to Iptables. If you're unfamiliar with fail2ban Chris Fidao has a wonderful (& free!) series about security including setting up fail2ban here.
Recently Laravel released a new feature in 5.1 to throttle authentication attempts by simply adding a trait to your authentication controller. The Laravel throttle trait uses the inputted username, and IP address to throttle attempts. I love seeing this added to a framework out of the box, but what about some of our other apps not built on Laravel? Like a WordPress login? Or even an open API etc.? Ultimately,
To connect to MSSQL using PHP 5.6 we'll need to use PDO's DBLIB (PDO_DBLIB) http://php.net/manual/en/ref.pdo-dblib.php and FreeTDS http://www.freetds.org/
This quick tutorial is using Ubuntu Server 14.04
First, make sure you're up to date on all of your packages.
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
I'm using PHP 5.6.9 (https://launchpad.net/~ondrej/+archive/ubuntu/php5-5.6)