Michael Bianco iloveitaly

View select_itunes_dj.applescript
1 2 3 4 5 6 7 8 9 10
on select_dj_playlist(playlist_name)
try
with timeout of 10 seconds
tell application "Finder"
set os_version to version
end tell
set errorString to ""
tell application "System Events"
View setup_ichat_trigger.applescript
1 2 3 4 5 6 7 8 9 10
tell application "Messages" to activate
 
delay 3
 
tell application "System Events"
tell process "iChat"
keystroke "," using command down
click button "Alerts" of tool bar 1 of window 1
View disable_asset_logger.rb
1 2 3 4 5 6 7 8 9 10
# app/middleware/disable_assets_logger.rb
 
# https://github.com/rails/rails/issues/2639#issuecomment-6591735
# http://stackoverflow.com/questions/6312448/how-to-disable-logging-of-asset-pipeline-sprockets-messages-in-rails-3-1
 
class DisableAssetsLogger
def initialize(app)
@app = app
Rails.application.assets.logger = Logger.new('/dev/null')
end
View snippets.bash
1 2 3 4 5 6 7 8 9 10
# dreamhost server setup
curl https://gist.github.com/iloveitaly/6979578/raw/.bash_profile > ~/.bash_profile
curl https://gist.github.com/iloveitaly/6979578/raw/.gitconfig > ~/.gitconfig
curl https://gist.github.com/iloveitaly/6979578/raw/.phprc >> $HOME/.php/5.4/phprc
 
# add ssh key to remote server for easy login
cat ~/.ssh/id_rsa.pub | ssh login@server.com 'mkdir ~/.ssh; touch ~/.ssh/authorized_keys; cat >> ~/.ssh/authorized_keys'
 
# switch essential wordpress settings when dumping from production DB to dev DB
wp option set siteurl http://joy.dev/
View olark.php
1 2 3 4 5 6 7 8 9 10
<?php
/*
Plugin Name: OLark
Description: Live Chat
Version: 1.0
Author: Michael Bianco
Author URI: http://github.com/iloveitaly/
*/
 
function admin_page () {
View wp-config.php
1 2 3 4 5 6 7 8 9 10
<?php
 
/* Config Custom
*******************************/
 
define('IS_LOCAL', isset($_SERVER['IS_PRODUCTION']) || strpos($_SERVER['DOCUMENT_ROOT'], '/Users/Mike') === 0);
 
if(IS_LOCAL) {
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', true);
View fiximagelinks.php
1 2 3 4 5 6 7 8 9 10
View livereload.php
1 2 3 4 5 6 7 8 9 10
<?php
 
/*
Plugin Name: LiveReloadSimple
Description: Adds the JavaScript for LiveReload to a WordPress site
Version: 1.0
Author: Peter Wilson
Author URI: http://peterwilson.cc/
 
*/
View .bash_profile
1 2 3 4 5 6 7 8 9 10
export EDITOR=nano
export LANG=en_US.UTF-8
 
alias ..="cd .."
alias ...="cd ../.."
 
alias g=git
alias glo='git log --graph --pretty=format:"%Cred%h%Creset - %s %Cgreen(%cr)%Creset" --abbrev-commit --date=relative'
alias gpb='g pull --rebase origin `git rev-parse --abbrev-ref HEAD`'
alias gsu='git submodule update --init --recursive'
View convert_video_for_web.rb
1 2 3 4 5 6 7 8 9 10
#!/bin/ruby
 
# we need some CLI tools:
# * ffmpeg (install via http://www.evermeet.cx/ffmpeg/)
# * qt-faststart `brew install qtfaststart`
 
# global vars are a cheap hack for the get_output method
 
# based on: https://develop.participatoryculture.org/index.php/ConversionMatrix
# detailed information on encoding here: https://www.virag.si/2012/01/web-video-encoding-tutorial-with-ffmpeg-0-9/
Something went wrong with that request. Please try again.