Skip to content

Instantly share code, notes, and snippets.

View JemiloII's full-sized avatar

Brian Jemilo II JemiloII

View GitHub Profile
@JemiloII
JemiloII / legos.html
Created December 23, 2014 06:35
Lego List for Google to Import
This file has been truncated, but you can view the full file.
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
</head>
<body>
<table cellspacing="0" cellpadding="4" rules="rows" border="0" id="myDataGrid" style="color:Black;background-color:White;border-color:White;border-width:0px;border-style:None;font-family:Verdana;font-size:10px;width:336px;border-collapse:collapse;">
<tbody><tr class="brickborder" style="color:#666666;background-color:White;font-weight:bold;">
<td class="brickborder">&nbsp;</td><td class="brickborder" style="color:#666666;">Brick Name</td><td class="brickborder" align="right" style="color:#666666;">Price</td><td class="brickborder">&nbsp;</td><td class="brickborder">&nbsp;</td>
@JemiloII
JemiloII / Load Sails.io.js
Created December 16, 2014 17:33
Proper way to load Sails.io.js
<script>
(function onLoad() {
var io;
Object.defineProperty(window, 'io', {
get: function get() {
return io;
},
set: function set(value) {
var sails;
io = value;
@JemiloII
JemiloII / Bar.js
Created December 16, 2014 17:15
Is this possible to do in sails? Reference a model from another model.
/**
* Bar.js
*
* @description :: Model for the Bar Collection
* @docs :: http://sailsjs.org/#!documentation/models
*/
module.exports = {
attributes: {
@JemiloII
JemiloII / MyStorageEvent.js
Last active April 8, 2018 04:17
This is just the beginning of the native storage promise system
Storage.prototype._setItem = Storage.prototype.setItem;
Storage.prototype.setItem = function(key, value, type, name) {
var eventName = name || 'storage';
var eventObject = {
"target": window,
"type": "storage",
"bubbles": false,
"cancelable": false,
App.Member = DS.Model.extend({
username: DS.attr('string'),
type: DS.attr('string'),
createdAt: DS.attr('date'),
updatedAt: DS.attr('date')
});
@JemiloII
JemiloII / adapter.js
Created August 28, 2014 20:32
my adapter.js
App.ApplicationAdapter = DS.SailsSocketAdapter.extend({
host: 'http://localhost:1337'
});
@JemiloII
JemiloII / ember-data.sails-adapter.js
Created August 28, 2014 20:29
My ember-data.sails-adapter.js
(function() {
/*global Ember*/
/*global DS*/
/*global io*/
'use strict';
var RSVP = Ember.RSVP;
var get = Ember.get;
DS.SailsRESTAdapter = DS.RESTAdapter.extend({
@JemiloII
JemiloII / serializer.js
Created August 28, 2014 20:28
My serializer.js
App.ApplicationSerializer = DS.JSONSerializer.extend({
serializeIntoHash: function(hash, type, record, options) {
Ember.merge(hash, this.serialize(record, options));
}
});
@JemiloII
JemiloII / Member.js
Last active August 29, 2015 14:05
Showing Dafe_ my controller
App.Member = DS.Model.extend({
username: DS.attr('string'),
type: DS.attr('string'),
createdAt: DS.attr('date'),
updatedAt: DS.attr('date'),
});
/* Put your CSS here */
html, body {
margin: 20px;
}
.active {font-weight: bold;}