This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Allowing ipv4 forward | |
echo 1 > /proc/sys/net/ipv4/ip_forward | |
# Redirect request response to source | |
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE | |
# Redirect request on port 80 (TCP) to destionation's ip -> port 80 | |
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j DNAT --to-destination xx.xx.xx.xx:80 | |
# Allow forwarding of this port |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Sites | |
$sitesArray[] = "https://silentkernel.fr"; | |
$sitesArray[] = "https://storage.silentkernel.fr"; | |
// Users | |
$usersUrlArray[] = "https://smsapi.free-mobile.fr/sendmsg?user=xxxxxxx&pass=xxxxxxxxxx&msg="; | |
// Begin code | |
function getResponseInfo($url) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://silentkernel.fr/utiliser-un-casque-usb-sous-debian/ | |
apt-get install pavucontrol |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
docker pull silentk/nginx-proxy | |
docker pull jrcs/letsencrypt-nginx-proxy-companion | |
docker stop nginx-proxy && docker rm nginx-proxy | |
docker run -d -p 80:80 -p 443:443 --restart always \ | |
--name nginx-proxy \ | |
-v /home/certificates:/etc/nginx/certs:ro \ | |
-v /etc/nginx/vhost.d \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var isIOS = ( navigator.userAgent.match(/(iPad|iPhone|iPod)/g) ? true : false ); | |
function showFacebookShare(control) | |
{ | |
if (!isIOS) | |
{ | |
window.open(control.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=500,width=700'); | |
return false; | |
} | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Sites | |
$sitesArray[] = "https://silentkernel.fr"; | |
$sitesArray[] = "https://storage.silentkernel.fr"; | |
// Users | |
$usersUrlArray[] = "https://smsapi.free-mobile.fr/sendmsg?user=xxxxxxx&pass=xxxxxxxxxx&msg="; | |
// Begin code | |
function getResponseInfo($url) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen *:80y; | |
server_name .monsite.fr; | |
root /homme/www/monsite; | |
index index.html; | |
# Cette "Location" n'est accessible qu'en interne, on ne peut pas y | |
# accéder directement depuis le navigateur. | |
# ici les fichiers se trouveront dans /home/www/download/ISO/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// On recupere la vitesse, renvoie 0 si du texte est entré ici | |
$speed = intval($_GET["speed"]); | |
// Le nom du fichier (sur le disque et envoyer au navigateur) | |
$filename = "ubuntu-14.04.3-desktop-amd64.iso"; | |
/* On évite les valeurs hors sujet pour la vitesse (et on met max 1 mega octet par seconde) */ | |
if ($speed > 0 && $speed <= 1000) { | |
// Convertie octet en kilo octet | |
$speed *= 1000; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
upstream plex-upstream { | |
server localhost:32400; | |
} | |
server { | |
listen 80; | |
server_name mon.domaine.com; | |
location / { | |
if ($http_x_plex_device_name = '') { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Injectable} from "@angular/core"; | |
import {Httpd} from "@ionic-native/httpd"; | |
import {File} from '@ionic-native/file'; | |
import {Platform} from 'ionic-angular'; | |
import {Subscription} from "rxjs/Subscription"; | |
@Injectable() | |
export class IosHttpdService { | |
private readonly serverPort: number = 1210; | |
private platformIsReady: boolean = false; |
OlderNewer