Skip to content

Instantly share code, notes, and snippets.

View nanoninja's full-sized avatar

Vincent Letourneau nanoninja

View GitHub Profile
server {
listen 80;
server_name localhost;
root /var/www/html;
error_log /var/log/nginx/localhost.error.log;
access_log /var/log/nginx/localhost.access.log;
location / {
@nanoninja
nanoninja / ubuntu.sh
Created January 21, 2019 09:00
ubuntu1804
#!/bin/bash
USERNAME=$USER
#-----------------
# Remove packages
#-----------------
sudo apt purge --assume-yes aisleriot \
gnome-sudoku \
ace-of-penguins \
@nanoninja
nanoninja / README.md
Last active July 22, 2017 13:28
Concurrent Stack Of Errors

Concurrent Stack Of Errors

It just an experimental package to handle concurrent errors stack. The concept is based on the First Class Functions and inspired by Dave Cheney posts.

Example

func main() {
 s := NewStack()
@nanoninja
nanoninja / go-memento.md
Last active July 21, 2017 15:00
Go Memento

Go Memento

Code Coverage

Download

go get golang.org/x/tools/cmd/cover
@nanoninja
nanoninja / http_basic_auth_timeout.go
Created July 11, 2017 21:58
Go Basic Authentication with timeout
package main
import (
"fmt"
"net/http"
"time"
)
var Realm = "Authorization Required"
@nanoninja
nanoninja / .htaccess
Created May 22, 2017 09:50
Apache Rewrite Rules
# public/.htaccess
RewriteBase /mvc2/public
# NC == INSENSITIVE CASE
# L == LAST RULE
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
@nanoninja
nanoninja / README.md
Last active September 16, 2017 13:51
Websocket Go Chat

Websocket Go chat

Installation

After installing Go and setting up your GOPATH

go get golang.org/x/net/websocket

Running chat

@nanoninja
nanoninja / README.md
Last active March 2, 2017 17:21
Composer install

Install Composer

Comment installer les librairies

̀sh cd /home/dev/www/ipssi composer install ̀

# /etc/apache2/sites-available/ipssi.fr.conf
<VirtualHost *:80>
ServerName ipssi.fr
ServerAlias www.ipssi.fr
ServerAlias test.ipssi.fr
DocumentRoot /home/dev/www/ipssi
<Directory /home/dev/www/ipssi>
@nanoninja
nanoninja / docker-compose.yml
Created January 5, 2017 14:30
Docker Compose PHPStorm
# export DISPLAY=127.0.0.1:0
# xhost + 127.0.0.1
version: '2'
services:
phpstorm:
image: jgautheron/phpstorm
privileged: true
environment:
- DISPLAY=$DISPLAY
volumes: