Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>React Tutorial</title>
<!-- Not present in the tutorial. Just for basic styling. -->
<link rel="stylesheet" href="css/base.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.8/react.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.8/react-dom.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.6.16/browser.js"></script>
@rtmalone
rtmalone / htmlplayer.js
Created January 13, 2016 17:44
rabble mobile player
'use strict';
angular.module('rabbleClientApp')
.directive('htmlplayer', function ($rootScope, $state, $timeout, $detection, PlayerUtilsService, constants, LogService, ListensService, SocketUtilsService, MessageService) {
var directive = {
restrict: 'E',
transclude: true,
templateUrl: '/views/templates/htmlplayer.html',
scope :{
{
"disallowEmptyBlocks": true,
"disallowKeywordsOnNewLine": ["else"],
"disallowKeywords": ["with"],
"disallowMixedSpacesAndTabs": true,
"disallowMultipleLineBreaks": true,
"disallowMultipleLineStrings": true,
"disallowMultipleSpaces": true,
"disallowNewlineBeforeBlockStatements": true,
"disallowOperatorBeforeLineBreak": ["."],
{
/* ENVIRONMENTS */
// specify a white list of global variables that are not formally defined in the source code.
// See "environment" options in JSHINT Docs
"globals": ["node", "jquery", "browser"],
/* ENFORCING */
// This option requires you to always put curly braces around blocks in loops and conditionals
@rtmalone
rtmalone / gist:ab6e894fc216bab7543e
Created May 31, 2014 19:31
Google Map Nav fix with CSS
If you are using google maps with foundation you may have noticed the nav controls over to map not rendering correctly. It appears some CSS foundation sets interferes with such things on a google map. Here is the fix:
#map img {
max-width: none;
}
http://foundation.zurb.com/forum/posts/173-google-map-css-issue
class Month
attr_reader :month, :year, :first_wkday_of_month
# weekdays = "Su Mo Tu We Th Fr Sa"
def initialize(month, year)
@month = month
@year = year
@days_in_month = days_in_month(month, year)
@first_wkday_of_month = Zellers.calculate(month, year)