This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Mixin | |
class PermissionRequiredMixin: | |
required_permissions = [] | |
def route(self, request, path_components): | |
if not request.user.has_perms(self.required_permissions): | |
return RouteResult(self, kwargs={'permission_check_failed': True}) | |
return super().route(request, path_components) |
- https://www.lullabot.com/articles/deblobbing-your-chunks-building-a-flexible-content-model
- http://www.washingtonpost.com/news/wonkblog/wp/2014/05/08/the-solutions-to-all-our-problems-may-be-buried-in-pdfs-that-nobody-reads/
- http://karenmcgrane.com/2014/10/15/content-in-a-zombie-apocalypse/
- http://karenmcgrane.com/category/drupal/
Interesting use of Drupal > Couch > Node > React (iso)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"always_show_minimap_viewport": true, | |
"auto_complete": false, | |
"auto_complete_commit_on_tab": true, | |
"auto_match_enabled": true, | |
"bold_folder_labels": true, | |
"caret_style": "solid", | |
"color_scheme": "Packages/User/SublimeLinter/Material Oceanic Next (SL).tmTheme", | |
"detect_indentation": true, | |
"draw_indent_guides": true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import * as utils from '../utils'; | |
var whichAnimationEvent = utils.whichAnimationEvent(); | |
export default React.createClass({ | |
getNode() { | |
return this.refs.node.getDOMNode(); | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { Router, Link } from 'react-router'; | |
import Modal from 'react-modal'; | |
import Slider from '../components/Slider.js'; | |
import Metric from '../components/Metric.js'; | |
import DEFAULTS from '../config/defaults.js'; | |
var appElement = document.getElementById('mount'); | |
Modal.setAppElement(appElement); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import Flickity from 'flickity'; | |
export default React.createClass({ | |
getInitialState() { | |
return { | |
selectedIndex: 0 | |
} | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function uuid() { | |
var i, random; | |
var uuid = ''; | |
for (i = 0; i < 32; i++) { | |
random = Math.random() * 16 | 0; | |
if (i === 8 || i === 12 || i === 16 || i === 20) { | |
uuid += '-'; | |
} | |
uuid += (i === 12 ? 4 : (i === 16 ? (random & 3 | 8) : random)).toString(16); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scss_files: 'site/*/scss/**/*.scss' | |
exclude: 'site/**/scss/**/vendor/*.scss' | |
linters: | |
BorderZero: | |
enabled: true | |
Indentation: | |
severity: warning | |
width: 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Slider test</title> | |
<style type="text/css"> | |
body { | |
font-family: pitch, courier; | |
margin: 4em; | |
} |