Skip to content

Instantly share code, notes, and snippets.

View mojaray2k's full-sized avatar

Amen Moja Ra mojaray2k

  • Miami, Fl
View GitHub Profile
@mojaray2k
mojaray2k / shell command
Created April 17, 2013 06:26
Change Domain Document Root
#enter this command after you create and save your vhosts file
/usr/local/psa/admin/bin/httpdmng --reconfigure-domain example.com
@mojaray2k
mojaray2k / disable-xdebug.php
Created April 28, 2013 20:41
In order to prevent xdebug add xdebug_disable()
<?php if(function_exists('xdebug_disable')) { xdebug_disable(); }?>
@mojaray2k
mojaray2k / JavaScript Plugins 1
Created June 16, 2013 17:14
Create a Background overlay in javascript
//overlay.js
var myOverlay = document.createElement('div');
myOverlay.id = "overlay";
document.body.appendChild(myOverlay);
//Setup Overlay Styles
myOverlay.style.position = 'absolute';
myOverlay.style.top = 0;
myOverlay.style.backgroundColor = 'rgb(0,0,0,0.7)';
@mojaray2k
mojaray2k / JavaScript 4
Created June 16, 2013 17:19
Add a event handler in native javasceipt
//addEventListener.js
var mynode = document.querySelecter("#submitButton");
mynode.addEventListener('click', function(){
}); //add }, false) if you don't want the event to bubble

Susy Tutorial

For this tutorial I'm assuming you are already comfortable with CSS, Sass (I'll use the SCSS syntax) and Compass. Please get set up with each one of those before attempting to use Susy. Sass and Compass both have their own setup instructions and tutorials that you can use.

There is also reference documentation in the works.

What Susy Does

CSS Systems

@mojaray2k
mojaray2k / JavaScript 3
Created July 18, 2013 17:00
In your browser if you press F12 a new window called developer tools will open, this allows you to view the entire HTML DOM in more detail, this also has a console feature which will allow you to type in any Javascript to run at this current time on the page. You can use the console to display a list of events currently assigned to an element by…
//get-events.js
$._data( $('.element')[0], 'events' );
@mojaray2k
mojaray2k / Browsers 2
Created August 8, 2013 20:15
Setting Class Attributes in IE and All Browsers
//setattribute.js
//Setting Class Attributes in IE and all Browsers
document.getElementById("hotel-title-area-wrapper").setAttribute("class","second");
//This works in non IE broswers
document.getElementById("hotel-title-area-wrapper").className="First";
@mojaray2k
mojaray2k / API 1
Created August 11, 2013 07:00 — forked from sosedoff/opentable_client.rb
Unofficial OpenTable API
# Unofficial OpenTable API
This project was created for one purpose — to make OpenTable data easily accesible to developers. No longer do you have to download XLS file, parse it and insert into your app's database. That shit is annoying.
It is absolutely free and open for everyone to use.
Created by @dan_sosedoff while drinking beers with @alwaysunday in Austin, TX.
## Usage
@mojaray2k
mojaray2k / HTTP CONF 1
Created August 13, 2013 09:30
Settings for Passenger for Apache
LoadModule passenger_module /usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.10/buildout/apache2/mod_passenger.so
PassengerRoot /usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.10
PassengerDefaultRuby /usr/local/bin/ruby
@mojaray2k
mojaray2k / Backbone 1
Last active December 21, 2015 01:09
Creating Simple Backbone Js Routers
//The name of this file is backbone-routes.js
var AppRouter = Backbone.Router.extend({
routes: {
"": "list",
"menu-items/new": "itemForm",
"menu-items/:item": "itemDetails"
},
list: function () {