Skip to content

Instantly share code, notes, and snippets.

View davidandreoletti's full-sized avatar

David Andreoletti davidandreoletti

View GitHub Profile

The Ying-Yang of CEOs and Engineers

All successful startups begin with two founders. One guy is the Engineer, and the other guy is the business dude. Over the years of working with various people, I've learned what makes a good engineer, and what makes a good business dude, and the two are complete opposites of each other.

CEO Engineer
#!/bin/bash
# This snippet should hypothetically allow a totally unattended
# installation of Apple's XCode. After prompting for credentials,
# the script simulates a login, begins a download and subsequently
# mounts the disk image and installs XCode to the default location.
echo -n "ADC login: "
read login
echo -n "ADC password: "
#!/bin/bash
# This snippet should hypothetically allow a totally unattended
# installation of Apple's XCode. After prompting for credentials,
# the script simulates a login, begins a download and subsequently
# mounts the disk image and installs XCode to the default location.
echo -n "ADC login: "
read login
echo -n "ADC password: "
@davidandreoletti
davidandreoletti / virtualbox-version-oneliner
Created July 24, 2013 14:06
Get latest VirtualBox version - oneliner
wget -qO - http://download.virtualbox.org/virtualbox/ | sed -nr 's/^[^"]+"//;s/".*//;/^[0-9].*\/$/p' | sed s'/.$//' | sort --version-sort | tail -n 1
4.2.12
:)
@davidandreoletti
davidandreoletti / aliases
Created September 1, 2013 06:10 — forked from kaleb/aliases
#~/.mutt/aliases
alias nick Nicholas Levandoski <nick.levandoski@auglug.org>
alias tim Timothy Pitt <timothy.pitt@auglug.org>
alias steven Steven Jackson <sjackson@auglug.org>
alias kaleb Kaleb Hornsby <kaleb.hornsby@auglug.org>
alias alug-admin nick, tim, steven

Mutt/Gmail/OS X Keychain

Create a new keychain item, enter the Keychain Item Name as mutt, the Account Name as your gmail email address and then enter your password, then add the keychain item.

2-step auth

If you're using Google 2-step auth, you'll need to generate an Application-specific password from your Google Account settings and enter that as the password.

#!/usr/bin/perl
use Mysql;
use strict;
use vars qw($school_name);
use vars qw($pass);
require "./cgi-lib.pl";
/*
* ARCMacro.h 1.1 2012/05/29 https://gist.github.com/2823399
*
* ARCMacro.h realizes coexistence of both the ARC (Automatic
* Reference Counting) mode and the Non-ARC mode of Objective-C
* in the same source code. This macro works for iOS and Mac OS X.
*
* This is a by-product of joint research by AIST and The University of Ryukyu.
* HIRANO Satoshi (AIST), NAKAMURA Morikazu (U. Ryukyu) and GUAN Senlin (U. Ryukyu)
*
You appear to be advocating a new:
[ ] cloud-hosted [ ] locally installable [ ] web-based [ ] browser-based [ ] language-agnostic
[ ] language-specific IDE. Your IDE will not succeed. Here is why it will not succeed.
You appear to believe that:
[ ] Syntax highlighting is what makes programming difficult
[ ] Garbage collection is free
[ ] Computers have infinite memory
[ ] Nobody really needs:
#!/usr/bin/env sh
ioreg -l | grep -i capacity | tr '\n' ' | ' | awk '{printf("%.2f%%\n", $10/$5 * 100)}'