Skip to content

Instantly share code, notes, and snippets.

View icemancast's full-sized avatar

Isaac Castillo icemancast

View GitHub Profile
@icemancast
icemancast / Terminal remove directory
Created November 27, 2011 15:31
Remove a directory through terminal
rm -rf /path/to/directory (remove a directory)
rm -rf /tmp/foo (remove directory)
@icemancast
icemancast / Alias Config
Created November 28, 2011 04:11
Add new site alias
(Add this to /usr/local/etc/aliases.conf)
Alias /my_organization/my_company/my_project/ "/Users/[your_user]/Sites/projects/my_organization/my_company/my_project/web/"
<Directory "/Users/[your_user]/Sites/projects/my_organization/my_company/my_project/web/">
Options -Indexes FollowSymlinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
@icemancast
icemancast / crontab
Created December 3, 2011 17:28
setup cron job
$ crontab -e
crontab -e Edit your crontab file, or create one if it doesn’t already exist.
crontab -l Display your crontab file.
crontab -r Remove your crontab file.
crontab -v Display the last time you edited your crontab file (This option is only available on a few systems.)
* * * * * command to be executed
- - - - -
| | | | |
@icemancast
icemancast / gist:1429086
Created December 4, 2011 03:48
SSH to Media Temple
ssh root@xxx.xxx.xxx.xxx
Alias /cbcsanantonio/ "/Users/icastillo/Sites/cbcsanantonio/20120113/www/"
<Directory "/Users/icastillo/Sites/cbcsanantonio/20120113/www/">
Options -Indexes +FollowSymlinks
AllowOverride All
Require all granted
@import "reset";
@import "text";
@import "976_16";
body{
background:#000;
margin:0;
}
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.1 23576 1668 ? Ss Sep11 0:00 init
root 1170 0.0 0.2 49424 2672 ? Ss Sep11 0:00 /usr/sbin/sshd -D
root 1188 0.0 0.1 18888 1016 ? Ss Sep11 0:00 cron
mysql 1192 0.0 2.7 189348 26336 ? Ssl Sep11 0:00 /usr/sbin/mysqld
syslog 1212 0.0 0.0 12536 800 ? Ss Sep11 0:00 /sbin/syslogd -u syslog
root 1249 0.0 1.0 202636 10136 ? Ss Sep11 0:00 /usr/sbin/apache2 -k start
www-data 1262 0.0 4.7 246760 44920 ? S Sep11 0:01 /usr/sbin/apache2 -k start
www-data 1263 0.0 4.8 247784 45804 ? S Sep11 0:02 /usr/sbin/apache2 -k start
www-data 1264 0.0 4.3 242664 41344 ? S Sep11 0:00 /usr/sbin/apache2 -k start
@icemancast
icemancast / counts
Created December 4, 2012 21:48
counts
class CreateCounts < ActiveRecord::Migration
def change
create_table :counts do |t|
t.string :item_id
t.text :count
t.timestamps
end
end
@icemancast
icemancast / Wordpress Function File
Last active December 10, 2015 22:08
Working wordpress functions
<?php
/**
* Check to see if theme options class exists and load it.
*/
if( file_exists( STYLESHEETPATH . 'class.trinitheme-options.php') )
{
require_once( STYLESHEETPATH . 'class.trinitheme-options.php');
}
App.Router.map(function () {
this.resource('sams', { path: '/' });
this.resource('app', { path: '/app/:app_slug' });
this.resource('dashboard', { path: '/dashboard' }, function () {
this.route('user');
});
});
App.DashboardUser = Ember.View.extend({
templateName: 'user'