Skip to content

Instantly share code, notes, and snippets.

Avatar
🍒
Jetset lifestyle

Chris panique

🍒
Jetset lifestyle
  • Berlin (DE) & Athens (GR)
View GitHub Profile
View adminer.conf
# 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
#
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;
@panique
panique / mysqldumpsplitter.sh
Created Jun 30, 2013
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…
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
@panique
panique / php_password_functions_demo.php
Last active Dec 17, 2015
This is a simple demo of the new PHP 5.5 password functions.
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/>";
@panique
panique / dabblet.css
Created Oct 27, 2012 — forked from kizu/dabblet.css
No flexbox here
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 {