Skip to content

Instantly share code, notes, and snippets.

View panique's full-sized avatar
🍒
Jetset lifestyle

Chris panique

🍒
Jetset lifestyle
  • Kyiv (Ukraine)
View GitHub Profile
# this is an INCOMPLETE nginx config file, the lines below just show the lines you
# have to add to your normal nginx config file (usually /etc/nginx/sites-available/default
# and /etc/nginx/sites-enabled/default) to make Adminer work.
#
# 1. place adminer.php into the base folder of your application (where also your index.php is)
# 2. add this to the nginx config file
# 3. check if syntax is correct: sudo nginx -t
# 4. restart nginx to see the changes: sudo service nginx restart
# 5. use adminer by adding /adminer to you base domain/IP like http://192.168.33.66/adminer
#
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;
user www-data;
worker_processes 4;
pid /var/run/nginx.pid;
events {
worker_connections 768;
}
http {
sendfile on;
@panique
panique / mysqldumpsplitter.sh
Created June 30, 2013 18:52
This is a copy of the the excellent MySQLDumpSplitter shell script written by KEDAR from http://kedar.nitty-witty.com. As no professional tool was able to split my massive 22GB mysqldump file to multiple files (each one containing the whole statement for one table) and this little script did the job without any errors in short time, i think this…
#!/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
@panique
panique / php_password_functions_demo.php
Last active December 17, 2015 19:09
This is a simple demo of the new PHP 5.5 password functions.
<?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/>";
@panique
panique / dabblet.css
Created October 27, 2012 18:22 — forked from kizu/dabblet.css
No flexbox here
/* 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 {