Skip to content

Instantly share code, notes, and snippets.

View andyhausmann's full-sized avatar

Andy Hausmann andyhausmann

View GitHub Profile
/** Get all projects */
$projects = $this->nodeSearchService->findByProperties('', array('Test.Site:Project'), $this->context);
/** Sort projects */
foreach ($projects as $key => $project) {
$status[$key] = $project->getProperty('status');
$id[$key] = $project->getProperty('id');
}
array_multisort($status, SORT_DESC, $id, SORT_ASC, $projects);
@jwebcat
jwebcat / gist:5122366
Last active June 20, 2024 13:35 — forked from lemenkov/gist:1674929
Properly download from github using wget and curl
wget --no-check-certificate --content-disposition https://github.com/joyent/node/tarball/v0.7.1
# --no-check-cerftificate was necessary for me to have wget not puke about https
curl -LJO https://github.com/joyent/node/tarball/v0.7.1
@Air-Craft
Air-Craft / jquery.plugin-template.js
Created October 20, 2011 10:56
jQuery Plugin Design Pattern/Template Improved!
// if (!window.L) { window.L = function () { console.log(arguments);} } // optional EZ quick logging for debugging
/**
* A modified (improved?) version of the jQuery plugin design pattern
* See http://docs.jquery.com/Plugins/Authoring (near the bottom) for details.
*
* ADVANTAGES OF EITHER FRAMEWORK:
* - Encapsulates additional plugin action methods without polluting the jQuery.fn namespace
* - Ensures ability to use '$' even in compat modes
*
@jakebellacera
jakebellacera / ICS.php
Last active July 10, 2024 11:27
A convenient script to generate iCalendar (.ics) files on the fly in PHP.
<?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.
*