A Pen by cesare soldini on CodePen.
Forked from Apex Design Studio's Pen BB-8.
| module ChoicesFields | |
| extend ActiveSupport::Concern | |
| module ClassMethods | |
| # Class macro that defines useful function for choice fields (<option> tag fields). | |
| # | |
| # Will define: | |
| # ::fieldname_choices_hash | |
| # Returns the hash given to the `choices_field` macro function. | |
| # |
| { | |
| "always_show_minimap_viewport": false, | |
| "draw_white_space": "selection", | |
| "ensure_newline_at_eof_on_save": true, | |
| "fade_fold_buttons": false, | |
| "fold_buttons": true, | |
| "font_face": "Ubuntu Mono", | |
| "font_options": | |
| [ | |
| "gray_antialias" |
| function loopFrames(func) { | |
| let loopControl = { | |
| _continueFlag: true, | |
| break: function() { this._continueFlag = false }, | |
| continued: function() { return (this._continueFlag === true) } | |
| } | |
| requestAnimationFrame(() => { | |
| func(loopControl) | |
| if (loopControl.continued()) loopFrames(func) |
A Pen by cesare soldini on CodePen.
Forked from Apex Design Studio's Pen BB-8.
| //const fetch = require('node-fetch'); | |
| const _ = require('lodash'); | |
| const moment = require('moment'); | |
| const process = require('process'); | |
| const d3 = require('d3'); | |
| Object.prototype.inspect = function(fn = (x => x)) { console.log(fn(this)); return this; }; | |
| const repos = [ | |
| 'clojure/clojurescript', |
| var collection = [1, 2, 3, 4, 5, 6] | |
| class B extends React.Component { | |
| onLinkClick = (info) => { | |
| alert(info) | |
| } | |
| render() { | |
| return ( | |
| <div> |
| const regl = require('regl')() | |
| const mat4 = require('gl-mat4') | |
| const generateTorus = require('primitive-torus') | |
| const generateCube = require('primitive-cube') | |
| const generatePlane = require('primitive-plane') | |
| const makeCamera = require('regl-camera') | |
| const camera = makeCamera(regl, { | |
| center: [0, 10, 0], |
| # Your init script | |
| # | |
| # Atom will evaluate this file each time a new window is opened. It is run | |
| # after packages are loaded/activated and after the previous editor state | |
| # has been restored. | |
| getPrevChar = (editor, chars = 1) -> | |
| pos = editor.getCursorBufferPosition() | |
| posStart = pos.translate([0, -chars]) | |
| posEnd = pos |
| 'use strict' | |
| const mobx = require('mobx') | |
| const a = mobx.observable({ | |
| b: 1, | |
| c: [], | |
| }) | |
| const dom = [ |