Skip to content

Instantly share code, notes, and snippets.

Louis D. LouWii

Block or report user

Report or block LouWii

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View handle-youtube-link
@LouWii
LouWii / verify-hard-links
Last active Aug 29, 2015
Verify links to files, to know if accessible or not
View verify-hard-links
@LouWii
LouWii / regex-url-parts.php
Created Oct 1, 2015
regex to handle different parts of a URL (host, path, query, anchor...)
View regex-url-parts.php
<?php
$re = "/^(([^:\\/?#]+):)?(\\/\\/([^\\/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?/";
$str = "http://www.ics.uci.edu/pub/ietf/uri/?page=3&color=red#Related\n";
preg_match($re, $str, $matches);
/* matches will be
1. [0-5] `http:`
2. [0-4] `http`
@LouWii
LouWii / robot.js
Created Dec 7, 2012 — forked from jaskolek/robot.js
ForkedBot
View robot.js
var robots = new Array();
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
Robot.prototype.start = function( ev ){
@LouWii
LouWii / robot.js
Created Dec 7, 2012
YouCannotLoose
View robot.js
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.clone();
@LouWii
LouWii / nginx.conf
Last active Dec 22, 2015 — forked from leon/nginx.conf
NGinx Server block configuration for Symfony 2 app.
View nginx.conf
# Things needed to be adapted :
# server_name my-domain.com
#
# root /home/www
# The root of the Symfony "web" folder (with app.php and app_dev.php in it).
#
# fastcgi_pass unix:/var/run/php5-fpm.sock
# This sock can be elsewhere (/var/run/php5-fpm/php5-fpm.sock for example...)
#
# There are other things needed to be changed/fixed.
@LouWii
LouWii / cron-edit.sh
Created Jan 25, 2016
Backup a database using Cron
View cron-edit.sh
# Edit your crontab file using crontab -e command
#
# Example of job definition:
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# | | | | |
# * * * * * user-name command to be executed
@LouWii
LouWii / gist:c48bf908a906f7d4da0c
Last active Aug 4, 2016
Apache login protection for specific host
View gist:c48bf908a906f7d4da0c
### If the server is accessed throught the dev URL example.dev
### User will need to authenticate.
SetEnvIf Host ^example\.dev$ require_auth=true
AuthUserFile /Path/To/.htpasswd
AuthName "Password Protected"
AuthType Basic
# Setup a deny/allow
Order Deny,Allow
@LouWii
LouWii / enable_telnet.md
Last active Dec 7, 2016
Scan environment and set the best channel possible on your DJI Phantom 3 Standard controller and drone (requires telnet enabled)
View enable_telnet.md
View keybase.md

Keybase proof

I hereby claim:

  • I am louwii on github.
  • I am louwii (https://keybase.io/louwii) on keybase.
  • I have a public key whose fingerprint is ECB5 44C1 9BE3 DA64 96A9 324C D904 BB01 4F59 5F3B

To claim this, I am signing this object:

You can’t perform that action at this time.