Skip to content

Instantly share code, notes, and snippets.

@robu
robu / .bash_profile
Last active April 2, 2017 16:41 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management

Keybase proof

I hereby claim:

  • I am robu on github.
  • I am robu (https://keybase.io/robu) on keybase.
  • I have a public key whose fingerprint is C4E9 ACC8 78D8 787F 4A7A D3B2 4864 F0FA 265A CD55

To claim this, I am signing this object:

@Override
public void setTitle(String title) {
ComponentList componentList = (ComponentList) getComponents(FIELD_NAME_TITLE);
if (componentList == null) {
componentList = new ComponentList(getContentContainer().getContent(true), FIELD_NAME_TITLE);
getContentContainer().getContent(true).put(FIELD_NAME_TITLE, componentList);
}
Iterator<Component> compIter = componentList.iterator();
Component titleComponent = null;
if (compIter.hasNext()) {

Note to Self

Be Confident

Tests build confidence. Write 'em. They'll save your ass, and they'll let you take a chainsaw to your code without being afraid of unintended consequences.

Be Lazy

function fadeOut(id) {
var elem = document.getElementById(id);
var colorTo = elem.style.backgroundColor;
var attribs = { color: {to: colorTo} };
var anim = new YAHOO.util.ColorAnim(id, attribs);
anim.onComplete.subscribe(function() {
elem.style.display = 'none';
});
anim.animate();
}
@robu
robu / linode_setup.sh
Created February 1, 2009 19:37
Script generating a script setting up a clean Ubuntu VPS (at linode.com, but anywhere should work, really).
#!/bin/bash
function yesno {
local yesno_response="yes"
echo -n "$1 ($yesno_response): "
read yesno_response_in
if test -n "${yesno_response_in}" ; then let yesno_response=yesno_response_in ; fi
YESNO_RESPONSE="N"
case $yesno_response in
[Yy]*) YESNO_RESPONSE="Y";;