Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.
In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit
<?php | |
function require_auth() { | |
$AUTH_USER = 'admin'; | |
$AUTH_PASS = 'admin'; | |
header('Cache-Control: no-cache, must-revalidate, max-age=0'); | |
$has_supplied_credentials = !(empty($_SERVER['PHP_AUTH_USER']) && empty($_SERVER['PHP_AUTH_PW'])); | |
$is_not_authenticated = ( | |
!$has_supplied_credentials || | |
$_SERVER['PHP_AUTH_USER'] != $AUTH_USER || | |
$_SERVER['PHP_AUTH_PW'] != $AUTH_PASS |
Some OVH dedicated server does not supports installing Debian original kernel due to hardware support issue.
Most common issue is the network adapter card.
#!/bin/bash | |
# video demo at: http://www.youtube.com/watch?v=90xoathBYfk | |
# written by "mhwombat": https://bbs.archlinux.org/viewtopic.php?id=71938&p=2 | |
# Based on "snippy" by "sessy" | |
# (https://bbs.archlinux.org/viewtopic.php?id=71938) | |
# | |
# You will also need "dmenu", "xsel" and "xdotool". Get them from your linux | |
# distro in the usual way. | |
# |
global | |
log /dev/log local0 | |
log /dev/log local1 notice | |
chroot /var/lib/haproxy | |
stats socket /run/haproxy/admin.sock mode 660 level admin | |
stats timeout 30s | |
user haproxy | |
group haproxy | |
daemon | |
maxconn 2048 |
More complete info here http://cluster015.ovh.net/infos/ (thanks to @42antoine)
/usr/local/php5.3/bin/php => PHP 5.3.29 (cli) (built: Nov 21 2017 08:55:07)
/usr/local/php5.4/bin/php => PHP 5.4.45 (cli) (built: Nov 21 2017 08:35:51)
/usr/local/php5.5/bin/php => PHP 5.5.38 (cli) (built: Nov 21 2017 08:46:45)
DELETE FROM ps_accessory WHERE id_product_1 NOT IN (select p.id_product from ps_product p); | |
DELETE FROM ps_accessory WHERE id_product_2 NOT IN (select p.id_product from ps_product p); | |
DELETE FROM ps_address WHERE id_customer NOT IN (select c.id_customer from ps_customer c); | |
DELETE FROM ps_product_comment WHERE id_product NOT IN (select p.id_product from ps_product p); | |
DELETE FROM ps_product_comment_grade WHERE id_product_comment NOT IN (select pc.id_product_comment from ps_product_comment pc); | |
DELETE FROM ps_product_comment_usefulness WHERE id_product_comment NOT IN (select pc.id_product_comment from ps_product_comment pc); | |
DELETE FROM ps_product_lang WHERE id_product NOT IN (select p.id_product from ps_product p); |
#!/bin/bash | |
fileid="FILEIDENTIFIER" | |
filename="FILENAME" | |
curl -c ./cookie -s -L "https://drive.google.com/uc?export=download&id=${fileid}" > /dev/null | |
curl -Lb ./cookie "https://drive.google.com/uc?export=download&confirm=`awk '/download/ {print $NF}' ./cookie`&id=${fileid}" -o ${filename} |