This is the code that powers the #luahelp pastebin.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cron
css
font
img
includes
js
.gitignore
.htaccess
README
browse.php
delete.php
diff.php
favicon.ico
index.php
logout.php
paste.php
recent.php
snippets.sql
user.php
view.php

README

When initially installing, you need to have a MySQL database setup and you must run snippets.sql on that database.

Once the tables are created, you need to create a file called config.php in ./includes/ with the following information in it:

<?php

$dbhost = 'host of database (usually localhost)';
$dbuser = 'database user';
$dbpass = 'database password';
$dbname = 'database name';

?>

Required Nginx rewrite rules are as follows: 

rewrite /(\d+)$ /view.php?id=$1 last;
rewrite ^(\D+)$ /$1.php;

In order for pastes to delete after the expire 
time you need to set the hourly.php script in the /cron folder to run once an hour.