Skip to content

Instantly share code, notes, and snippets.

View nelsonpecora's full-sized avatar

Nelson Pecora nelsonpecora

View GitHub Profile
4/24/11 20:39:35 efssmartd[545] ExtFS: Media <disk2, 0x5220b0> created with parent (null).
4/24/11 20:39:35 efssmartd[545] ExtFS: Media <disk2s2, 0x130b70> created with parent <disk2, 0x5220b0>.
4/24/11 20:39:35 efssmartd[545] ExtFS: Media <disk2s1, 0x128f30> created with parent <disk2, 0x5220b0>.
4/24/11 20:39:36 efssmartd[545] ExtFS: Existing media <disk2s2, 0x130b70> appeared again.
4/24/11 20:39:36 CleanMyMacHelperTool[6257] Mounted devices (
)
4/24/11 20:39:36 CleanMyMacHelperTool[6257] CleanMyMacHelperTool started as volume cleaner with cleanTrashes 1 cleanMacOSJunk 1 cleanWinJunk 1
4/24/11 20:39:36 CleanMyMacHelperTool[6257] Mounted devices (
)
4/24/11 20:39:36 CleanMyMacHelperTool[6257] CleanMyMacHelperTool exited...
@nelsonpecora
nelsonpecora / cssgent.css
Created May 9, 2011 02:00
Gentlemanly CSS Stuff
#div1 {
float: left;
}
#div2 {
float: right;
}
@media iphone-whatever {
#div2 {
/* put <a href="foo"></a> inside your div */
#div a {
width: 100%;
height: 100%; /* will fill the whole block */
display: block; /* will make it actually a block-level ...thingy */
}
@nelsonpecora
nelsonpecora / dbdump.sh
Created December 13, 2011 18:46
Quick MySQL & git database backup
#!/bin/bash
# This script should properly dump a mysql db, add, and commit it to git
echo "Please enter database name: "
read db_name
echo "Username: "
read user
echo "Password: "
read -s pass
@nelsonpecora
nelsonpecora / .profile
Created January 5, 2012 19:41
Work profile, with some fun stuff in it
alias devgrep="grep --exclude-dir='.svn' --exclude-dir='.git' -rin"
alias unixtime="date +%s"
export EDITOR=vim
export http_proxy="ema-proxy.am.hedani.net:8080"
export HTTP_PROXY="ema-proxy.am.hedani.net:8080"
export https_proxy="ema-proxy.am.hedani.net:8080"
export HTTPS_PROXY="ema-proxy.am.hedani.net:8080"
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # This loads RVM into a shell session.
@nelsonpecora
nelsonpecora / Grid
Created January 10, 2012 18:16
ExtJS Grid Example
var win5Data = [
['3m Co', 71.72, 0.02, 0.03, '9/1 12:00am'],
['Alcoa Inc', 29.01, 0.42, 1.47, '9/1 12:00am'],
['Altria Group Inc', 83.81, 0.28, 0.34, '9/1 12:00am'],
['American Express Company', 52.55, 0.01, 0.02, '9/1 12:00am'],
['American International Group, Inc.', 64.13, 0.31, 0.49, '9/1 12:00am'],
['AT&T Inc.', 31.61, -0.48, -1.54, '9/1 12:00am'],
['Boeing Co.', 75.43, 0.53, 0.71, '9/1 12:00am'],
['Caterpillar Inc.', 67.27, 0.92, 1.39, '9/1 12:00am'],
['Citigroup, Inc.', 49.37, 0.02, 0.04, '9/1 12:00am'],
@nelsonpecora
nelsonpecora / peuler4.js
Created January 17, 2012 21:06
Project Euler Problem 4
Array.prototype.max = function() {
var max = this[0];
var len = this.length;
for (var i = 0; i < len; i++) {
if (this[i] > max) {
max = this[i];
}
}
return max;
}
@nelsonpecora
nelsonpecora / .gitconfig
Created February 6, 2012 22:18
Global Gitconfig
[user]
email = nelson@yoshokatana.com
name = Nelson Pecora
[alias]
up = pull origin
st = status
di = diff
co = checkout
ci = commit
br = branch
@nelsonpecora
nelsonpecora / .gitignore
Created February 6, 2012 22:20
My default gitignore file
# osx noise
.DS_Store
profile
# xcode noise
build/*
*.mode1
*.mode1v3
*.mode2v3
*.perspective
@nelsonpecora
nelsonpecora / omnisearch.js
Created February 8, 2012 16:39
Filtering an n-columned ExtJS grid from a searchbox
onSearchFieldChange: function (obj, value) {
var store, searchRegExp;
store = Ext.getStore();
store.clearFilter();
searchRegExp = new RegExp(value, 'i');
store.filterBy(function (item) {
var i = 0,
l = Object.keys(item.data).length;