Skip to content

Instantly share code, notes, and snippets.

@datacodesolutions
datacodesolutions / composer_sync.py
Created February 10, 2013 22:38
Sync Composer to App without .git
#! /usr/bin/python
# imports
import os, sys, os.path, pprint, tarfile
from subprocess import call
# vars
tarfile_name = 'vendor.tar.gz'
syncdir_source = 'vendor'
syncdir_target = '/Path/To/App'
# 1. Install fabric: sudo pip install fabric
# 2. Use this file with the name of fabfile.py and place it in project root.
# 3. Execute deploy: fab staging deploy
from __future__ import with_statement
from fabric.api import *
from fabric.contrib.console import confirm
env.key_filename = ["/path/to/ssh/key"]
path = ''
@datacodesolutions
datacodesolutions / show_hide.sh
Created November 23, 2012 20:42
Mac Shell Commands
defaults write com.apple.finder AppleShowAllFiles -bool true
killall Finder
/* remove artifacts that show in chrome with animations */
-webkit-backface-visibility:hidden;
{
"auto_match_enabled": false,
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
"folder_exclude_patterns":
[
".svn",
".git",
".hg",
"CVS",
".idea"
@datacodesolutions
datacodesolutions / backup_remote_to_local.py
Created October 20, 2012 06:31
Python Backup Remote to Local
#! /usr/bin/python
# imports
from ftplib import FTP
import os, sys, os.path, pprint, tarfile
class siteBackup:
#init vars
listing = []
@datacodesolutions
datacodesolutions / incremental_backup.sh
Created October 20, 2012 06:30
Bash incremental backup
tar cvpzf ./test_backup.tar.gz --newer-mtime='-3 days' --exclude='.git' ./Sites/*
@datacodesolutions
datacodesolutions / placeholder.js
Created October 18, 2012 22:10
IE7 placeholder
if (!Modernizr.input.placeholder){
var val;
$('input[type^="text"]')
.addClass('placeholder')
.each(function(){
val = $(this).attr('placeholder');
$(this).val(val);
});
$('.placeholder')
# debug object in controller
render :text => params.inspect
@datacodesolutions
datacodesolutions / php.ini
Created October 4, 2012 16:23
XDebug Settings - php.ini
xdebug.remote_enable=1
xdebug.remote_autostart = 1
xdebug.idekey = PHPSTORM
xdebug.remote_port = 9000
xdebug.var_display_max_data = 10240
xdebug.var_display_max_depth = 10