Skip to content

Instantly share code, notes, and snippets.

View Ternoc's full-sized avatar

Ternoc Ternoc

  • Bordeaux
  • 08:39 (UTC +02:00)
View GitHub Profile
@Ternoc
Ternoc / sources.list
Last active November 15, 2015 14:05
Debian sources list FR 64bit Wheezy /etc/apt/sources.list
deb http://ftp.fr.debian.org/debian stable main contrib non-free
deb-src http://ftp.fr.debian.org/debian stable main contrib non-free
deb http://ftp.debian.org/debian/ jessie-updates main contrib non-free
deb-src http://ftp.debian.org/debian/ jessie-updates main contrib non-free
deb http://security.debian.org/ jessie/updates main contrib non-free
deb-src http://security.debian.org/ jessie/updates main contrib non-free
@Ternoc
Ternoc / recaptcha.function.php
Last active August 29, 2015 14:20
Easy fuction for veryfing a recaptcha
/*
Call this function to verify is the ReCaptcha is valid
Call with parameter :
$_POST['g-recaptcha-response']
Call with this optional parmater :
$user_ip
Return false is recaptcha is invalid or true if valid
if(isValid($_POST['g-recaptcha-response']))
{
echo 'recaptcha valid';
@Ternoc
Ternoc / .htaccess
Last active August 29, 2015 14:21
Hide .php extension in the URL
RewriteEngine On
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteCond %{REQUEST_URI} !/$
RewriteRule ^(.*)$ $1\.php
@Ternoc
Ternoc / api.php
Last active August 29, 2015 14:23
Test curl with post request
<?php
header('Content-Type: application/json');
$data = array();
foreach ($_GET as $key => $value) {
$data['get'][$key] = $value;
}
foreach ($_POST as $key => $value) {
$data['post'][$key] = $value;
}
echo json_encode($data);
@Ternoc
Ternoc / curl.php
Last active August 29, 2015 14:24
Basic CURL
<?php
$postfields = array(
'postfield1' => 'test postfield 1 content',
'postfield2' => 'test postfield 2 content'
);
$headerfields = array(
'User-Agent : Test',
'Oauth2 Token MyToken'
);
@Ternoc
Ternoc / remove_crw.cmd
Last active September 1, 2015 17:34 — forked from xvitaly/remove_crw.cmd
Remove telemetry updates for Windows 7 and 8.1
echo Uninstalling KB3075249 (telemetry for Win7/8.1)
start /w wusa.exe /uninstall /kb:3075249 /quiet /norestart
echo Uninstalling KB3080149 (telemetry for Win7/8.1)
start /w wusa.exe /uninstall /kb:3080149 /quiet /norestart
echo Uninstalling KB3021917 (telemetry for Win7)
start /w wusa.exe /uninstall /kb:3021917 /quiet /norestart
echo Uninstalling KB3022345 (telemetry)
start /w wusa.exe /uninstall /kb:3022345 /quiet /norestart
echo Uninstalling KB3068708 (telemetry)
start /w wusa.exe /uninstall /kb:3068708 /quiet /norestart
@Ternoc
Ternoc / .gitignore
Created June 14, 2016 18:54
Global gitignore
# Created by https://www.gitignore.io
### Windows ###
# Windows image file caches
Thumbs.db
ehthumbs.db
# Folder config file
Desktop.ini
league logo : 512*256
league1.dds
league2.dds
Team logo : 256*256
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v2
mQENBFhQYA8BCACqe0NSA1yW1Uoup9LduH9h8kqqr7dtl/ooEprUFDE9U8srguPU
6JsTXcySb3eRxk+eSvP4Fbpn/bKAmlul1EsJKUT1m1kp8p9hQU5NDbhjyQSlBEqV
Uenh+vGgJD8rbwEvTgaM7YMawjKf2tXZhaE0Sq31IrktIKWuV/epth2ZOU38fp0i
7m7MlfsEvZGlq+vNcvh7xxAx0ALdLEgeKBOIlhL77ZooPJtFa9ehzsv0FIhU38D7
SURtrs3E/HZhzkPR2WvAvACfdM3qn/r7OuoveN8rCdQ+zkJrDM/0MkDBcKqzWfbZ
Y1uStSIb+5cAfDPDhyaO3ejHzgB3CPmruBHjABEBAAG0KVByb2pldCAyMSA8cHJl
c2lkZW50LXByb2pldDIxQG91dGxvb2suZnI+iQE5BBMBCAAjBQJYUGAPAhsDBwsJ
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v2
mQENBFgB+dwBCADurAV1qNNQIBL470EHM++I2whRDy/5r4214ygFAN1R3bSBZvYt
Tox5q145yGz3vbUN6IbTEQgTtX8i5sFzfWEtTauhHihY0IwswGgo9LZYyTNYCs3o
LKhClMK0OO3n9ku8TyDk/QXQwxVPspJ1cWbAw3xG/y4h43xV+ezLy3XSq3ADotYY
q3888eY/6Q8F/rfYkHt4aSpCxOfwRWZ/ItsiuXu2iEfdiFMLA26+06VOKfc2V7Te
OWFHbOEo80pGzkYqlYbyLYjPfmBuJeeNPtq2S3rnhrskgyToyaOoH9/13PEj95FT
ftnxw8FD3q6e0WNbY6XBdebecriBHvT6HZjdABEBAAG0JFRlcm5vYyA8ZXV2ZnRl
YW0uaGhoYTIwMDBAZ21haWwuY29tPokBOQQTAQgAIwUCWAH53AIbAwcLCQgHAwIB