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

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew tap caskroom/cask
brew install brew-cask
brew cask install google-chrome
brew update && brew upgrade brew-cask && brew cleanup
brew cask install spotify
@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 / gist:1185442
Created September 1, 2011 04:17
Fix for broken Grid scrollers in Extjs 4.0.2a
Ext.require('Ext.grid.Panel',function(){
Ext.override(Ext.grid.Panel, {
constructor: function() {
this.on('scrollershow', function(scroller) {
if (scroller && scroller.scrollEl) {
scroller.clearManagedListeners();
scroller.mon(scroller.scrollEl, 'scroll', scroller.onElScroll, scroller);
}
});
this.callOverridden();
<?php
// File containing cronjobs
$cronFile = dirname(__FILE__) . '/crontab';
// Lockfile to prevent multiple instances
$pidFile = dirname(__FILE__) . '/cron.lock';
// Exit file to signal a running instance to exit
$exitFile = dirname(__FILE__) . '/cron.exit';
@EHLOVader
EHLOVader / branches SVN
Created December 13, 2011 00:03
http conf for dynamic local dev
<VirtualHost *:80>
ServerAlias *.svn.branch.*
UseCanonicalName Off
LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
RewriteLog "C:\WebDev\Apache\logs\mod_rewrite_svn.log"
RewriteLogLevel 1
VirtualDocumentRoot "C:\WebDev\SVN\%1\branches\%5+"
@EHLOVader
EHLOVader / gist:1473452
Created December 13, 2011 19:18
Fix for VirtualDocumentRoot issues in Apache.
<?php apache_setenv("DOCUMENT_ROOT",$_SERVER['DOCUMENT_ROOT'] = str_replace($_SERVER['SCRIPT_NAME'], '', $_SERVER['SCRIPT_FILENAME'])) ?>
@EHLOVader
EHLOVader / gist:1486452
Created December 16, 2011 15:25
Lemonstand: get select options for field function example
public function get_field_name_options($current_key_value = -1)
{
$options = array(
'value'=>'text',
'someid'=>'Some Option'
);
if ($current_key_value == -1)
return $options;