Skip to content

Instantly share code, notes, and snippets.

<?php
//configs
$email_to ='me@myemail-address.com'; //put your email address here
$email_subject_prefix ='MySite.com contact form: '; //put the email sibject line prefix here
$email_from ='server@yourserver.com'; //put the email address that this form will be sent from
$email_from_nice ='Server'; //put in the 'nice' name for the email sender
//If the form is submitted
if(isset($_POST['submit'])) {
<?php
//configs
$email_to ='me@myemail-address.com'; //put your email address here
$email_subject_prefix ='MySite.com contact form: '; //put the email sibject line prefix here
$email_from ='server@yourserver.com'; //put the email address that this form will be sent from
$email_from_nice ='Server'; //put in the 'nice' name for the email sender
//If the form is submitted
if(isset($_POST['submit'])) {
<?php
//configs
$email_to ='me@myemail-address.com'; //put your email address here
$email_subject_prefix ='MySite.com contact form: '; //put the email sibject line prefix here
$email_from ='server@yourserver.com'; //put the email address that this form will be sent from
$email_from_nice ='Server'; //put in the 'nice' name for the email sender
//If the form is submitted
if(isset($_POST['submit'])) {
@justinkelly
justinkelly / gist:480987
Created July 19, 2010 03:43
Pinboard.in & Delicious to RSS script
<?php
/** Config section - start **/
$bookmark_user = "--your-username-";
$bookmark_pass = "--your-password";
$bookmark_service = "pinboard.in"; // pinboard.in or delicious.com/del.icio.us
/** Config section - end **/
<VirtualHost *:80>
# Admin email, Server Name (domain name) and any aliases
ServerAdmin webmaster@domain1.com
ServerName redmine.yourdomain.com
DocumentRoot /usr/share/redmine/public
# Custom log file locations
LogLevel warn
@justinkelly
justinkelly / Google Apps SRV records :: DNS
Created October 5, 2010 03:10
Google Apps SRV records :: DNS
; SRV
_jabber._tcp.@ 1 IN SRV 5 0 5269 xmpp-server.l.google.com
_jabber._tcp.@ 1 IN SRV 20 0 5269 xmpp-server4.l.google.com
_jabber._tcp.@ 1 IN SRV 20 0 5269 xmpp-server2.l.google.com
_jabber._tcp.@ 1 IN SRV 20 0 5269 xmpp-server1.l.google.com
_jabber._tcp.@ 1 IN SRV 20 0 5269 xmpp-server3.l.google.com
_xmpp-client._tcp.@ 1 IN SRV 5 0 5222 talk.l.google.com
_xmpp-client._tcp.@ 1 IN SRV 50 0 5222 talk4.l.google.com
_xmpp-client._tcp.@ 1 IN SRV 5 0 5222 talk1.l.google.com
_xmpp-client._tcp.@ 1 IN SRV 20 0 5222 talk3.l.google.com
<Directory />
Options FollowSymLinks
AllowOverride All
Options -Indexes
</Directory>
Alias /code /var/bzr/repo/
WSGIScriptAliasMatch ^/code/.*/\.bzr/smart$ /var/bzr/repo/bzr_serve.wsgi
@justinkelly
justinkelly / javascript_mobile_OS_detector.js
Created October 12, 2010 03:09
Javascript mobile OS detector
/*
* Simple javascript mobile OS / iphone/ android detector
*
* License: GPLv3+
* Author: justin.kelly.org.au
*
*/
$(document).ready(function() {
var deviceIphone = "iphone";
@justinkelly
justinkelly / apache trac config file
Created October 19, 2010 01:07
Trac wsgi file TRAC_ENV_PARENT_DIR
##depengind how you want to structure your trac urls
# WSGIScriptAliasMatch ^/users/([^/]+) /var/trac/trac.wsgi
WSGIScriptAlias /trac /var/trac/trac.wsgi
## If using htpasswd auth you will need
# <Location "/trac/login">
# AuthType Basic
# AuthName "Trac"
# AuthUserFile /home/justin/public_html/bzr.bz/private/trac/.htpasswd
# Require valid-user
@justinkelly
justinkelly / trac.wsgi
Created October 22, 2010 00:14
trac wsgi file for parent dir
# for more info refer: http://blog.justin.kelly.org.au/tracwsgi-for-tracenvparentdir
# based on the trac.wsgi used for the trac + bzr hosting service http://bzr.bz
import sys
sys.stdout = sys.stderr
import os
os.environ['TRAC_ENV_PARENT_DIR'] = '/var/www/trac'
os.environ['PYTHON_EGG_CACHE'] = ' /usr/share/pyshared'