Skip to content

Instantly share code, notes, and snippets.

View flug's full-sized avatar
:octocat:
yeah yeah yeah

Flug flug

:octocat:
yeah yeah yeah
View GitHub Profile
[program:laravel-worker]
process_name=%(program_name)s_%(process_num)02d
command=php /home/forge/app.com/artisan queue:work sqs --sleep=3 --tries=3 --daemon
autostart=true
autorestart=true
user=forge
numprocs=8
redirect_stderr=true
stdout_logfile=/home/forge/app.com/worker.log
# mysqlbinlog mysql-bin.005757 | grep -i -e "^update" -e "^insert" -e "^delete" -e "^replace" -e "^alter" | cut -c1-100 | tr '[A-Z]' '[a-z]' | sed -e "s/\t/ /g;s/\`//g;s/(.*$//;s/ set .*$//;s/ as .*$//" | sed -e "s/ where .*$//" | sort | uniq -c | sort -nr | head -50
@flug
flug / readme.md
Last active September 15, 2017 09:46
Lock and unlock session linux with usb key

Well, a module called PAM (Pluggable Authentication module) can be customized to achieve your need. A beautiful article is available on linuxconfig describing this in detail.

The steps are:

Install PAM

$ sudo apt-get install pamusb-tools libpam-usb

Add USB device to PAM config

### Keybase proof
I hereby claim:
* I am flug on github.
* I am flug (https://keybase.io/flug) on keybase.
* I have a public key whose fingerprint is 4738 2F00 6DF1 4683 C534 CA40 6265 72F4 4ADA 0689
To claim this, I am signing this object:
@flug
flug / Autodesk Autocad 2017 Crack + Keygen + Serial Number
Created April 19, 2017 13:21
Autodesk Autocad 2017 Crack + Keygen + Serial Number
Autodesk Autocad 2017 Free Download Keygen / Crack / Serial Number
We have put together a file that consist of keygen,crack and serial numbers that can be used to activate Autocad 2017 Trial Version and make it into a full version. Installation instructions given below and in the file.
Please GOTO: http://new-crack-keygen.com/autocad-2017-keygen-crack-download/
Instructions:
1. Download and install the trial version of autocad from the official website
2. Install the keygen
<?php
namespace Omnipay\AbnInternetKassaIdealOnly;
use Omnipay\Common\Message\AbstractRequest;
use Omnipay\Common\Message\ResponseInterface;
class PurchaseRequest extends AbstractRequest {
private $pspId;
private $url;
@flug
flug / nginx
Created December 9, 2016 10:38
server {
listen 80;
server_name my.domain.com;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl;
server_name my.domain.com;
[...]
@flug
flug / wow
Created August 31, 2016 09:27
#!/bin/bash
WINEPREFIX=/home/ryan/.PlayOnLinux/wineprefix/battle.net primusrun wine ~/.PlayOnLinux/wineprefix/battle.net/drive_c/Program\ Files/World\ of\ Warcraft/Wow.exe
@flug
flug / distance.php
Last active October 31, 2019 14:28
[distance map] #php #googleMap
<?php
$provenance = '26200 MONTELIMAR';
$destination = '13001 MARSEILLE';
$dom = new DOMDocument();
$dom->validateOnParse = true;
$APIMAP = 'http://maps.googleapis.com/maps/api/distancematrix/xml?origins='.$provenance.'&destinations='.$destination.'&sensor=false';
$dom->load($APIMAP);
<?php
namespace MyBundle\Bundle\FrontendBundle\Twig\Loader;
use MyBundle\Bundle\FrontendBundle\Twig\MobileDetect;
use Symfony\Bundle\FrameworkBundle\Templating\Loader\FilesystemLoader;
use Symfony\Component\Config\FileLocatorInterface;
use Symfony\Component\Filesystem\Filesystem;