Skip to content

Instantly share code, notes, and snippets.

View iloveitaly's full-sized avatar

Michael Bianco iloveitaly

View GitHub Profile
@iloveitaly
iloveitaly / instantsearch.js
Created July 6, 2011 17:56
Instant Filtering for MooTools
var InstantSearchManager = new Class({
Implements: [Options],
options: {
searchDelay: 400,
baseURL: '/download/search'
},
initialize: function(holder, search, options) {
this.setOptions(options);
this.element = $(holder);
@iloveitaly
iloveitaly / node-less-install.bash
Created August 7, 2011 00:33
Install Node + LESS on a Dreamhost Server
#!/bin/bash
mkdir ~/tmp
curl http://nodejs.org/dist/node-v0.4.10.tar.gz -O
tar -xvf node-v0.4.10.tar.gz
cd node-v0.4.10
./configure --prefix=/usr && make
sudo make install
curl http://npmjs.org/install.sh | sh
npm install less -g
@iloveitaly
iloveitaly / Questions
Created August 13, 2011 22:33
Frozen Rails Give-away
Day job: Web Developer & Designer (PHP, Ruby, Python, HTML, CSS, etc)
Your Rails contributions (if any): None yet, fairly new to ruby.
What's your Ruby/Rail experience?: Used ruby for web testing via watir & some misc scripting purposes.
How do you use GitHub?: For open source projects and misc snippets / scripts
@iloveitaly
iloveitaly / ssh-key-transfer.bash
Created August 17, 2011 00:56
Move local SSH keys to production machine
#!/bin/bash
# sends your local dev machines keys to the production machine for easy deployment + ssh
if [[ ! -e ~/.ssh/id_rsa.pub ]]; then
echo "Local keys do not exist, creating them..."
ssh-keygen -t rsa
fi
echo "username"
read username
@iloveitaly
iloveitaly / bookmarklet.html
Created August 31, 2011 01:05
Format Vatical / Papal Documents / Encyclicals
<a href="javascript:(function(){var jsCode = document.createElement('script'); jsCode.setAttribute('src', 'https://raw.github.com/gist/1182569/30cc436e68b6a4f455cb354a773fbf9bd5723b5c/format_vatican.js'); document.body.appendChild(jsCode); }())">Format Vatical Website Bookmarklet</a>
@iloveitaly
iloveitaly / Mail.applescript
Created August 31, 2011 15:03
Lion Applescript Mail.applescript
-- Mail.applescript
-- iCal
-- !!! Note that this script is not compiled by iCal.xcodeproj, which uses a compiled version instead
-- !!! so changes to this file will not be reflected in iCal behavior unless manually recompiled.
-- (Not compiled because of <rdar://problem/3675416> osacompile fails in a chrooted environment)
on show_mail_sbrs(subjectLine, messageText, myrecipients)
tell application "Mail"
set mymail to (make new outgoing message at the beginning of outgoing messages with properties {subject:subjectLine, content:messageText})
repeat with i from (count of myrecipients) to 1 by -1
@iloveitaly
iloveitaly / git.bash
Created October 30, 2011 21:24
Automatic Build Numbers for XCode
#!/bin/bash
BASE_VERSION=572
VERSION_NUMBER=$((`git describe --match SVN-Import | ack "([0-9]+)-[^-]+$" --output='$1'` + $BASE_VERSION))
@iloveitaly
iloveitaly / Podfile.rb
Created November 1, 2011 17:38
MacRuby Snippets
# Enable garbage collection support, which MacRuby requires.
post_install do |installer|
installer.project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['GCC_ENABLE_OBJC_GC'] = 'supported'
end
end
end
generate_bridge_support!
@iloveitaly
iloveitaly / cross_fade.less
Created November 19, 2011 21:01
CSS3 Cross Fade Slider
.cssanimations #main_content_holder {
#image_holder {
position:relative;
img {
.transition(opacity, 1s);
top:0;
left:0;
position:absolute;
@iloveitaly
iloveitaly / CPSystemInformation.h
Created January 29, 2012 03:22
CPSystemInformation compatible with Lion + 64Bit
#import <Cocoa/Cocoa.h>
@interface CPSystemInformation : NSObject {}
//all the info at once!
+ (NSDictionary *)miniSystemProfile;
+ (NSString *)machineType;
+ (NSString *)humanMachineType;
+ (NSString *)humanMachineTypeAlternate;