Skip to content

Instantly share code, notes, and snippets.

View LouWii's full-sized avatar

Louis D. LouWii

View GitHub Profile
@LouWii
LouWii / enable_telnet.md
Last active December 7, 2016 03:55
Scan environment and set the best channel possible on your DJI Phantom 3 Standard controller and drone (requires telnet enabled)

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:

@LouWii
LouWii / Dockerfile
Last active June 1, 2021 02:37
Dockerfile for a PHP server with Apache and some php extensions pre-installed
FROM php:7.0-apache
MAINTAINER louwii@louwii.fr
# Install PHP extensions and PECL modules.
RUN buildDeps=" \
libbz2-dev \
libmysqlclient-dev \
libcurl4-gnutls-dev \
" \
runtimeDeps=" \
@LouWii
LouWii / README-SERVER-SETUP.md
Last active February 8, 2022 02:37
Simple setup guide for any webserver running Linux
@LouWii
LouWii / command.sh
Last active December 4, 2020 03:01
Convert Flac to MP3 320kbps
# This creates a mp3 folder and will put mp3 files in it after conversion; Requires ffmpeg and libmp3lame codec
# Found in the comments here: http://www.boback.com/2013/how-to-convert-flac-to-mp3-ubuntu-command-line/
# Change the quality using the qscale parameter or change it to -b:a 320k to convert to 320kbps bitrate (see https://trac.ffmpeg.org/wiki/Encode/MP3)
mkdir mp3 && for f in *.flac; do ffmpeg -i "$f" -codec:a libmp3lame -qscale:a 2 -map_metadata 0 "mp3/${f%.*}".mp3; done
@LouWii
LouWii / AcmePathRoles.php
Last active August 31, 2018 15:56 — forked from leotiger/allowed_roles_for_route.md
Symfony3: Check if a route is accessible for a ROLE or a list of ROLES
<?php
namespace Acme\Security\Roles;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\RouterInterface;
use Symfony\Component\Routing\Route;
use Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface;
use Symfony\Component\Security\Core\User\UserProviderInterface;
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
use Symfony\Bridge\Monolog\Logger;