This file contains hidden or 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
| inputs = %w[ | |
| CollectionSelectInput | |
| DateTimeInput | |
| FileInput | |
| GroupedCollectionSelectInput | |
| NumericInput | |
| PasswordInput | |
| RangeInput | |
| StringInput | |
| TextInput |
This file contains hidden or 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
| { | |
| "window.zoomLevel": -1, | |
| "window.title": "${activeEditorLong}${separator}${rootName}", | |
| "workbench.iconTheme": "vscode-great-icons", | |
| "editor.tabSize": 2, | |
| "files.trimTrailingWhitespace": true, | |
| "emmet.syntaxProfiles": { | |
| "javascript": "jsx" | |
| }, | |
| "files.associations": { |
This file contains hidden or 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
| const TOPIC = "topic" | |
| const CATEGORY = "category" | |
| const typeName = levels => (levels >= 3 ? TOPIC : CATEGORY) | |
| const createNode = ({ perLevel, levels, remainingLevels }) => { | |
| if (remainingLevels === 0) return { type: TOPIC, children: [] } | |
| return { | |
| type: typeName(levels - remainingLevels), |
This file contains hidden or 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 asyncMessage(msg) { | |
| let deferred | |
| const onMessage = function (msg) { | |
| if (deferred) { | |
| deferred.resolve(msg) | |
| deferred = null | |
| } | |
| } |
This file contains hidden or 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
| // http://stackoverflow.com/questions/8567114/how-to-make-an-ajax-call-without-jquery/18078705#18078705 | |
| var ajax = {}; | |
| ajax.xhr = function() { | |
| try { | |
| return new ActiveXObject('Msxml2.XMLHTTP') | |
| } catch (e1) { | |
| try { | |
| return new ActiveXObject('Microsoft.XMLHTTP') | |
| } catch (e2) { |
This file contains hidden or 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
| // Run like this: | |
| // cd client && webpack-dev-server --config webpack.development.config.js --hot --colors --progress --inline | |
| var config = require("./webpack.base.config"); | |
| var webpack = require("webpack"); | |
| var path = require("path"); | |
| var autoprefixer = require('autoprefixer'); | |
| var precss = require('precss') | |
| var autoprefixer = require('autoprefixer'); |
This file contains hidden or 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 R from 'ramda' | |
| /* | |
| Example | |
| createAsyncActionType('LOGIN') | |
| will return an object | |
| { |
This file contains hidden or 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
| Sidekiq.logger.formatter = proc do |severity, time, context, message| | |
| colorized_time = "#{time.utc.iso8601}".colorize(:cyan) | |
| case severity | |
| when 'INFO' | |
| colorized_severity = "#{severity}:".colorize(:green) | |
| "#{colorized_time} #{Process.pid} TID-#{Thread.current.object_id.to_s(36)}#{context} #{colorized_severity} #{message}\n" | |
| when 'ERROR' | |
| colorized_severity = "#{severity}:".colorize(:red) | |
| "#{colorized_time} #{Process.pid} TID-#{Thread.current.object_id.to_s(36)}#{context} #{colorized_severity} #{message}\n" |
This file contains hidden or 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
| ./scripts/build -- src/pick.js src/equals.js src/isEmpty.js src/curry.js src/omit.js src/merge.js src/append.js > dist/ramda.custom.js |
This file contains hidden or 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 fetch from 'isomorphic-fetch' | |
| import { camelizeKeys } from 'humps' | |
| import R from 'ramda' | |
| import { normalize, arrayOf } from 'normalizr' | |
| import Path from 'path-parser' | |
| import { encode } from 'querystring' | |
| import pluralize from 'pluralize' | |
| import { playlistSchema } from 'schemas' | |
| import { assocUid, mapValues } from 'utils/helpers' | |
| import cuid from 'cuid' |
NewerOlder