Skip to content

Instantly share code, notes, and snippets.

View icemancast's full-sized avatar

Isaac Castillo icemancast

View GitHub Profile
formError: function(errors)
{
var message = errorMessages(errors.exType);
return message;
},
<div class="message">
{{formError}}
</div>
// News click switcher
$('li[id*="newsSwitch-"').click(function (evt) {
var speed = 100;
var clickedClass = evt.currentTarget.id;
var clickedNumber = clickedClass.match(/\d/);
var title = document.getElementById('newsSwitch-title-' + clickedNumber).innerHTML;
// List all elements from routes promise
listIt: function () {
users = this.get('controllers.application.users');
return users
}.property('users'),
deleteUser: function (key) {
messageMethod.build('User', 'DELETE', '', key, function (data) {
console.log('deleted');
});
@icemancast
icemancast / gist:7444673
Created November 13, 2013 06:32
land lord email
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title></title>
<style></style>
</head>
<body style="background: #6e6e6e;">
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'
@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');
}
@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
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
@import "reset";
@import "text";
@import "976_16";
body{
background:#000;
margin:0;
}
Alias /cbcsanantonio/ "/Users/icastillo/Sites/cbcsanantonio/20120113/www/"
<Directory "/Users/icastillo/Sites/cbcsanantonio/20120113/www/">
Options -Indexes +FollowSymlinks
AllowOverride All
Require all granted