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
# delete all data
curl -XDELETE localhost:9200/test
# create an index and define specific french stop_words
curl -XPUT localhost:9200/test -d '{
"settings" : {
"index" : {
"analysis" : {
"analyzer" : {
"french" : {
@flug
flug / tmux-cheatsheet.markdown
Created October 14, 2015 20:44 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
<?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;
@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);
@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 / 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;
[...]
<?php
namespace Omnipay\AbnInternetKassaIdealOnly;
use Omnipay\Common\Message\AbstractRequest;
use Omnipay\Common\Message\ResponseInterface;
class PurchaseRequest extends AbstractRequest {
private $pspId;
private $url;
@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
### 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 / 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