Skip to content

Instantly share code, notes, and snippets.


Jake Bellacera jakebellacera

View GitHub Profile
jakebellacera / nginx-apache-reverse-proxy-wordpress-mu-vhost.conf
Created Sep 21, 2010
Useful nginx virtual host configuration for reverse proxy (proxy_pass) with Apache
View nginx-apache-reverse-proxy-wordpress-mu-vhost.conf
# useful nginx configuration for reverse proxy with Apache
# edit lines 8, 11, and 30
# taken from:
# edits by jakebellacera ( &&
server {
listen 80;
server_name *; # edit this to your domain
jakebellacera / dateToUnix.php
Created Oct 19, 2010
Quick little function to convert date strings to unix timestamps
View dateToUnix.php
// The Function
function dateToUnix($time) {
return date('U', strtotime($time));
// Example:
// We need to convert a simple string to a UNIX timestamp.
$sampleDate = '9/15/2010 05:30';
jakebellacera / ICS.php
Last active Sep 23, 2020
A convenient script to generate iCalendar (.ics) files on the fly in PHP.
View ICS.php
* This is free and unencumbered software released into the public domain.
* Anyone is free to copy, modify, publish, use, compile, sell, or
* distribute this software, either in source code form or as a compiled
* binary, for any purpose, commercial or non-commercial, and by any
* means.
jakebellacera / columns_template.less
Created Nov 18, 2010
Columns template for LESS CSS
View columns_template.less
General template for creating columns.
To use, just set a parent div with three different classes:
* .columns -- this defines the column class
View timthumb.php
// RFLX <img> resize
// server-side image resizing
function rflx_img_resize($src, $width, $height, $mu = true, $zoom = true) {
if ($zoom) {
if ($zoom == false) {
$z = 0;
} else {
$z = 1;
View proper-forms.html
<!-- Begin 'ze form -->
<h2>Contact Form</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
<legend>Name &amp; Stuff</legend>
jakebellacera / ajax-send.js
Created Feb 22, 2011
JQuery validate form that submits via AJAX
View ajax-send.js
ajax-send.js - copyright Jake Bellacera (
This script uses JQuery & JQuery Validate (
For this example, we will have a form named '#ajaxform', you can of course change this to whatever you'd like.
$('#submitbutton').click(function() {
jakebellacera / swfobject-gc.html
Created Apr 1, 2011
swfobject embedding for splash page/etc
View swfobject-gc.html
<!-- Paste these in the head if you're using a splash page -->
<script src="/engine/js/jquery/jquery-1.4.2.js" type="text/javascript"></script>
<script type="text/javascript" src="/engine/js/swfobject/swfobject-2.2.js"></script>
<!-- The actual video -->
<div id="video_player">Loading...</div>
<script type="text/javascript">
var vars = {};
var params = {};
jakebellacera / shell-buttons.scss
Created Apr 26, 2011
Custom CSS button framework for SASS
View shell-buttons.scss
* Shell Buttons
@mixin shellBtn-colors($color) {
$color1: lighten($color, 15%);
$color2: lighten($color, 5%);
$color3: lighten($color, 10%);
$color4: $color;
$color5: darken($color, 10%);
border-color: $color5;
jakebellacera / mail.js
Created Apr 29, 2011
A super advanced JS emailer. Uses the JQuery Validation plugin.
View mail.js
* Mail.js 1.1
* ===========
* A simple AJAX emailer
// Set rules for special fields (email/phone)
rules: {
You can’t perform that action at this time.