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 Link from "next/link"; | |
| import styled from "styled-components"; | |
| import Row from "@app/layouts/Row"; | |
| const StyledPager = styled(Row)` | |
| justify-content: center; | |
| min-width: 200px; | |
| max-width: 400px; | |
| margin: 1em auto 2em auto; |
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 { PRIMARY, PRIMARY_LIGHT, IRON_GREY } from '@styles/variables/colors' | |
| import React, { useEffect, useRef, useState } from 'react' | |
| import styled from 'styled-components' | |
| const Slider = styled.div` | |
| position: relative; | |
| margin: 16px auto; | |
| width: calc(100% - 12px); | |
| height: 8px; | |
| background: ${PRIMARY_LIGHT}; |
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
| <!-- https://jsfiddle.net/z2ov274f/ --> | |
| <div class="range" id="range"> | |
| <input type="range" class="lower" min="0" max="10.5" value="5.0" step="0.5"> | |
| <input type="range" class="upper" min="0" max="10.5" value="5.5" step="0.5"> | |
| </div> | |
| <div id="lower-val"></div> | |
| <div id="upper-val"></div> |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <title>Draft • Decorators</title> | |
| <link rel="stylesheet" href="../../dist/Draft.css" /> | |
| </head> | |
| <body> | |
| <div id="target"></div> | |
| <script src="../../node_modules/react/dist/react.js"></script> |
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 React, {Component} from 'react' | |
| import ReactDOM from 'react-dom'; | |
| import { EditorState, RichUtils,Editor, ContentState, DefaultDraftBlockRenderMap, convertFromHTML, getSafeBodyFromHTML, AtomicBlockUtils, CompositeDecorator} from 'draft-js'; | |
| import createImagePlugin from "draft-js-image-plugin"; | |
| import './rich-editor.scss' | |
| import * as Immutable from "immutable"; | |
| import {stateToHTML} from 'draft-js-export-html'; | |
| import {InlineStyleControls, BlockStyleControls} from './StyleButton' | |
| import Svg from 'common/Svg'; | |
| import createVideoPlugin from 'draft-js-video-plugin'; |
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 React from 'react'; | |
| import ReactDOM from 'react-dom'; | |
| import {AtomicBlockUtils, Editor, EditorState, Entity, RichUtils, convertToRaw} from 'draft-js'; | |
| class MyEditor extends React.Component { | |
| constructor(props) { | |
| super(props); | |
| this.state = {editorState: EditorState.createEmpty()}; |
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
| // hidapi-enum-tst.c -- Demonstrate enumerating | |
| // | |
| // Build with: (assumes you have checked out 'hidapi' into a side directory) | |
| // Mac: | |
| // gcc -I ../hidapi/hidapi ../hidapi/mac/hid.c -framework IOKit -framework CoreFoundation hidapi-enum-tst.c -o hidapi-enum-tst | |
| // Linux (hidraw): | |
| // gcc -I ../hidapi/hidapi ../hidapi/linux/hid.c -ludev hidapi-enum-tst.c -o hidapi-enum-tst | |
| // Linux (libusb): | |
| // gcc -I ../hidapi/hidapi -I /usr/include/libusb-1.0 ../hidapi/libusb/hid.c -lpthread -lusb-1.0 hidapi-enum-tst.c -o hidapi-enum-tst | |
| // |
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
| /******************************************************* | |
| HIDAPI - Multi-Platform library for | |
| communication with HID devices. | |
| Alan Ott | |
| Signal 11 Software | |
| 8/22/2009 | |
| Copyright 2009, All Rights Reserved. |
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
| module app; | |
| import std.stdio; | |
| import std.experimental.logger: trace; | |
| import std.conv; | |
| import gio.Application : GApplication = Application; | |
| import gtk.Main; | |
| import gtk.Application; |
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
| 'use strict'; | |
| const crypto = require('crypto'); | |
| const ENCRYPTION_KEY = process.env.ENCRYPTION_KEY; // Must be 256 bits (32 characters) | |
| const IV_LENGTH = 16; // For AES, this is always 16 | |
| function encrypt(text) { | |
| let iv = crypto.randomBytes(IV_LENGTH); | |
| let cipher = crypto.createCipheriv('aes-256-cbc', Buffer.from(ENCRYPTION_KEY), iv); |