Skip to content

Instantly share code, notes, and snippets.

@ryanneufeld
ryanneufeld / gallery.js
Created October 15, 2011 20:58
droppable problem
function loadPage(href) {
$('#main').load(href);
}
$('#main').delegate('a','click', function(){
loadPage(this.href);
return false;
});
//based on https://gist.github.com/07a297472f182f7a7132/79d3dea1e3dc7ce2d065a42316b83ec820671634
;(function($, undefined) {
$.notify = function(options) {
if(options.timeOut > 0)
{
//add the timer to the message
console.log($(options.message).find('.countDown'));
if($(options.message).find('.countDown').length > 0){
@ryanneufeld
ryanneufeld / gist:1994024
Created March 7, 2012 16:08 — forked from smonteverdi/gist:1993919
PHP: Generate Password
function generatePassword($length=9, $strength=0) {
$vowels = 'aeuy';
$consonants = 'bdghjmnpqrstvz';
if ($strength >= 1) {
$consonants .= 'BDGHJLMNPQRSTVWXZ';
}
if ($strength >= 2) {
$vowels .= "AEUY";
}
if ($strength >= 4) {
@ryanneufeld
ryanneufeld / Vagrant error
Created August 23, 2012 23:17
Vagrant output
ryan@ryanmacmini ~/jquery/infrastructure/vagrant$ vagrant provision 231 ↵ ✹ ✭ puppet-stage
[citadel] VM not created. Moving on...
[ps01] VM not created. Moving on...
[jq01] VM not created. Moving on...
[jq01.stage] Running provisioner: Vagrant::Provisioners::Shell...
stdin: is not a tty
[jq01.stage] Running provisioner: Vagrant::Provisioners::Shell...
stdin: is not a tty
--2012-08-24 01:09:02-- http://apt.puppetlabs.com/puppetlabs-release-squeeze.deb
Resolving apt.puppetlabs.com...
@ryanneufeld
ryanneufeld / server.pp
Created August 23, 2012 23:22
mysql.pp
/*
==Class: mysql::server
Parameters:
$mysql_data_dir:
set the data directory path, which is used to store all the databases
If set, copies the content of the default mysql data location. This is
necessary on Debian systems because the package installation script
@ryanneufeld
ryanneufeld / jquery.cookie.js
Created September 18, 2012 23:39
jquery.cookie.js
$get_ids = $DB_site->query("
SELECT a.id, b.iidd
FROM table_b , table_a
WHERE table_b.iidd = table_a.iidd
AND table_b.id = 0
");
while ($data = $DB_site->fetch_object($get_ids))
{
@ryanneufeld
ryanneufeld / gist:3839906
Created October 5, 2012 13:52
Object literal example.
var myObj = {
foo : "bar",
bar : "baz",
baz : 3.14
};
// then you can
myObj.foo === 'bar';
//OR
<style type="text/css" media="all">@import url("http://www.vbbros.net/dietz/sites/all/themes/clean/styles/clean.reset-browser.css?mbiqza");
@import url("http://www.vbbros.net/dietz/modules/system/system.base.css?mbiqza");
@import url("http://www.vbbros.net/dietz/modules/system/system.messages.css?mbiqza");
@import url("http://www.vbbros.net/dietz/modules/system/system.theme.css?mbiqza");</style>
<style type="text/css" media="all">@import url("http://www.vbbros.net/dietz/sites/all/modules/date/date_api/date.css?mbiqza");
@import url("http://www.vbbros.net/dietz/modules/field/theme/field.css?mbiqza");
@import url("http://www.vbbros.net/dietz/modules/node/node.css?mbiqza");
@import url("http://www.vbbros.net/dietz/modules/search/search.css?mbiqza");
@import url("http://www.vbbros.net/dietz/modules/user/user.css?mbiqza");
@import url("http://www.vbbros.net/dietz/sites/all/modules/video_filter/video_filter.css?mbiqza");