Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Add Vagrant's NFS setup commands to sudoers, for `vagrant up` without a password
# Updated to work with Vagrant 1.6.x @see https://github.com/mitchellh/vagrant/pull/3638
# Stage updated sudoers in a temporary file for syntax checking
TMP=$(mktemp -t vagrant_sudoers)
cat /etc/sudoers > $TMP
cat >> $TMP <<EOF
# Allow passwordless startup of Vagrant when using NFS.

Security Now
TechTV's Leo Laporte and I (Steve Gibson) take 30 to 90 minutes near the end of each week to discuss important issues of personal computer security. Sometimes we'll discuss something that just happened. Sometimes we'll talk about long-standing problems, concerns, or solutions. Either way, every week we endeavor to produce something interesting and important for every personal computer user.

This Week in Tech Your first podcast of the week is the last word in tech. Join the top tech pundits in a roundtable discussion of the latest trends in high tech.

Javascript Jabber
Your Prototype for Great Code

The Changelog

@EHLOVader
EHLOVader / test.js
Last active August 29, 2015 14:11 — forked from Garbee/test.js
var kuary = new Kuary(window);
kuary.add({
"keys": [
'up':['up':['down':['down':['left':['right':['left':['right':['b':['a':['enter']]]]]]]]]]
],
"execute": function() {
window.alert('KONAMI');
}
});
#!/bin/bash
function switch_files {
mv $1.png $1.tmp.png
mv $1-inverse.png $1.png
mv $1.tmp.png $1-inverse.png
mv $1@2x.png $1@2x.tmp.png
mv $1-inverse@2x.png $1@2x.png
mv $1@2x.tmp.png $1-inverse@2x.png
}
@EHLOVader
EHLOVader / sidebar_cart.php
Created January 23, 2012 20:10 — forked from dardub/gist:1665293
lemonstand side cart
<? $items = Shop_Cart::list_active_items();
$total = Shop_Cart::total_price();
$total_qty = Shop_cart::get_item_total_num();
?>
<div class="box base-mini mini-cart">
<div class="head">
<h4> &nbsp; My Cart</h4>
</div>
<div class="actions">
function style_forms() {
var ua = $.browser;
if (!(ua.msie && ua.version.slice(0,1) == "7"))
{
$('select, input:checkbox, input:radio').livequery(function(){
$(this).uniform();
});
}
}
<div id="write_review" class="clearfix">
<? if (isset($review_posted)): ?>
<p class="flash success">Your taste review has been successfully posted.</p>
<? else: ?>
<h3 id="review_link" class="clearfix"><a href="#" onclick="$('#review_form').removeClass('hidden'); $('#review_link').addClass('hidden'); return false;">Write Your Taste Review</a></h3>
<div id="review_form" class="hidden bottom_offset">
<ul class="form">
<li class="field">
<label><span class="label">Rating</span>
@EHLOVader
EHLOVader / pre_action.php
Last active October 7, 2015 21:18 — forked from GreatPotato/gist:3225912
Set shipping method automatically in LemonStand
<?php
/**
* Default shipping during checkout
* This snippet when added to the pre_action will allow you to default shipping selection.
*
* This is mostly useful when there is only one shipping option, this allows you to skip
* the shipping step of checkout entirely, simplifying things for your customers.
*
* This has been updated to use a dynamic method of pulling the first available shipping
* option from your list of available shipping options.
@EHLOVader
EHLOVader / gist:3706391
Created September 12, 2012 12:52 — forked from anonymous/gist:3706321
Blog Post page
<? if ($post): ?>
<h2><?= h($post->title) ?></h2>
<p>
Published by <?= h($post->created_user_name) ?>
on <?= $post->published_date->format('%F') ?>
Comment(s): <?= $post->approved_comment_num ?>
</p>
<?= $post->content ?>
@EHLOVader
EHLOVader / gist:3706390
Created September 12, 2012 12:52 — forked from anonymous/gist:3706319
Blog File Module
<?php
class BlogFiles_Module extends Core_ModuleBase{
/**
* Creates the module information object
* @return Core_ModuleInfo
*/
protected function createModuleInfo(){
return new Core_ModuleInfo(
"Blog Files",
"Adds files to blog posts",