Instantly share code, notes, and snippets.

View index.php
<?php
error_reporting(0);
set_time_limit(0);
$has_json = true;
function koken_http_get($url, $host_header = false)
{
$is_ssl = isset($_SERVER['HTTPS']) ? $_SERVER['HTTPS'] === 'on' || $_SERVER['HTTPS'] === 1 : $_SERVER['SERVER_PORT'] == 443;
View wordpress
server {
listen 80;
root /usr/share/nginx/www;
index index.php index.html index.htm;
server_name www.dev-metal.com;
# sitemap .xml
rewrite ^/sitemap_index\.xml$ /index.php?sitemap=1 last;
rewrite ^/([^/]+?)-sitemap([0-9]+)?\.xml$ /index.php?sitemap=$1&sitemap_n=$2 last;
View nginx.conf
user www-data;
worker_processes 4;
pid /var/run/nginx.pid;
events {
worker_connections 768;
}
http {
sendfile on;
View mysqldumpsplitter.sh
#!/bin/sh
# http://kedar.nitty-witty.com
#SPLIT DUMP FILE INTO INDIVIDUAL TABLE DUMPS
# Text color variables
txtund=$(tput sgr 0 1) # Underline
txtbld=$(tput bold) # Bold
txtred=$(tput setaf 1) # Red
txtgrn=$(tput setaf 2) # Green
txtylw=$(tput setaf 3) # Yellow
txtblu=$(tput setaf 4) # Blue
View php_password_functions_demo.php
<?php
// THOSE FUNCTIONS WILL WORK WITH PHP 5.5, if you want to use them with PHP 5.3 or 5.4
// you need to include the password.php file from this project:
// https://github.com/ircmaxell/password_compat/blob/master/lib/password.php
// require ('lib/password.php');
echo "Please note: These functions need at least PHP 5.3.7<br/>";
echo "You are running PHP ".phpversion();
echo "<br/>";
View dabblet.css
/* No flexbox here */
.wrapper {
background: linear-gradient(rgba(0,0,0,0.7),rgba(0,0,0,0.4));
overflow: hidden;
margin: 0 0 1em;
border-radius: 1em;
}
.pane {