Skip to content

Instantly share code, notes, and snippets.

View akaHeimdall's full-sized avatar
💭
Contemplating the unknowns of the universe

Saeed Richardson akaHeimdall

💭
Contemplating the unknowns of the universe
View GitHub Profile
class User < ActiveRecord::Base
has_and_belongs_to_many :roles
def role_symbols
(self.roles || []).map {|r| r.name.to_sym}
end
end
// Create an alert
var a = Titanium.UI.createAlertDialog();
a.setTitle('Table View Test')
a.setMessage('row ' + eventObject.row + ' index ' + eventObject.index + ' section ' + eventObject.section + ' rowData ' + eventObject.rowData + ' [eventObject.index].id: ' + rIndex.rosterID);
a.show();
thisID = $(eventObject.row + " id");
/correct formatting for a nested field in the dataArray
Titanium.API.debug('=================== rosterID: ' + dataArray[eventObject.index].rosterID );
<html>
<head>
</head>
<body style="background-color:#1c1c1c;margin:0">
<div style="border-top:1px solid #404040">
<div style="color:#fff;;padding:10px">Welcome to Titanium</div>
</div>
<script type="text/javascript" src="jquery-1.3.2.js"></script>
<html>
<head>
<link rel="stylesheet" href="css/tite_styles.css" type="text/css" media="screen" title="no title" charset="utf-8">
<link rel="stylesheet" href="css/custom-theme/jquery-ui-1.8rc1.custom.css" type="text/css" media="screen" title="no title" charset="utf-8">
<style type="text/css" media="screen">
.online {
background: -webkit-gradient(linear, left top, left bottom, from(#01B201), to(#018301));
-webkit-border-radius: 10px;
}
<!-- index.html -->
<html>
<head>
<link rel="stylesheet" href="css/tite_styles.css" type="text/css" media="screen" title="no title" charset="utf-8">
<link rel="stylesheet" href="css/custom-theme/jquery-ui-1.8rc1.custom.css" type="text/css" media="screen" title="no title" charset="utf-8">
</head>
<body>
<div id="contents">
#
# Cookbook Name:: delayed_job
# Recipe:: default
#
if ['solo', 'app', 'app_master'].include?(node[:instance_role])
# be sure to replace "app_name" with the name of your application.
run_for_app("maloca") do |app_name, data|
#
# Cookbook Name:: delayed_job
# Recipe:: default
#
if ['solo', 'app', 'app_master'].include?(node[:instance_role])
# be sure to replace "app_name" with the name of your application.
run_for_app("maloca") do |app_name, data|
language: node_js
node_js:
- 0.10.25
# - 0.10.30
services:
- mongodb
before_install:
- npm install -g phantomjs
- npm install -g velocity-cli
install:
@akaHeimdall
akaHeimdall / AnnouncementList.js
Created February 18, 2016 22:40
Sample react component for listing announcements
// AnnouncementList
// <AnnouncementList/>
import React from 'react';
import marked from 'marked';
var AnnouncementsList = React.createClass({
renderAnnouncement : function(key) {
// var linkState = this.props.linkState;
@akaHeimdall
akaHeimdall / App.js
Last active June 30, 2016 18:36
react component for main app that loads announcement list
// App
// <App/>
import React from 'react';
import Header from './Header';
import SenderNav from './SenderNav';
import Dashboard from './Dashboard';
import AnnouncementsList from './Announcements/AnnouncementsList';