> sanity documents get document-id | pbcopy
First make sure to define your editor using EDITOR=code (for vscode).
> sanity documents create --id documentId --watch --replace
| // Simple implementation of https://github.com/sanity-io/sanity/blob/21af6baffe88d57db32d0a05e048ef7d3d671523/packages/%40sanity/form-builder/src/inputs/ArrayInput/ArrayFunctions.tsx | |
| import React from "react"; | |
| import DropDownButton from "part:@sanity/components/buttons/dropdown"; | |
| import Button from "part:@sanity/components/buttons/default"; | |
| import ButtonGrid from "part:@sanity/components/buttons/button-grid"; | |
| import styles from "./styles/ArrayInput.css"; | |
| export default class ArrayFunctions extends React.Component { | |
| handleDropDownAction = (menuItem) => { |
| import React from "react" | |
| export default function useIsDragged(ref, offset = 5) { | |
| const isDragged = React.useRef(false) | |
| const isDown = React.useRef(false) | |
| const distance = React.useRef(0) | |
| const mousePos = React.useRef({ | |
| x: 0, | |
| y: 0, | |
| }) |
| // Type definitions for react-table 7 | |
| // Project: https://github.com/tannerlinsley/react-table#readme | |
| // Definitions by: Grsmto <https://github.com/grsmto> | |
| // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | |
| // TypeScript Version: 3.0 | |
| declare module 'react-table' { | |
| export type Cell = { | |
| render: (type: string) => any; | |
| getCellProps: () => any; | |
| column: Column; |
| const ExtractTextPlugin = require('extract-text-webpack-plugin'); | |
| const cssLoaderConfig = require('@zeit/next-css/css-loader-config'); | |
| const commonsChunkConfig = (config, test = /\.css$/) => { | |
| config.plugins = config.plugins.map(plugin => { | |
| if ( | |
| plugin.constructor.name === 'CommonsChunkPlugin' && | |
| // disable filenameTemplate checks here because they never match | |
| // (plugin.filenameTemplate === 'commons.js' || | |
| // plugin.filenameTemplate === 'main.js') |
| { | |
| "editor.minimap.enabled": false, | |
| "workbench.editor.labelFormat": "short", | |
| "workbench.editor.tabSizing": "shrink", | |
| "workbench.editor.enablePreview": false, | |
| "editor.formatOnPaste": true, | |
| "workbench.editor.showIcons": false, | |
| } |
| var fs = require('fs'); | |
| var dirPath = './imports'; | |
| var lang = 'de-de'; | |
| var files = fs.readdirSync(dirPath).filter(item => !(/(^|\/)\.[^\/\.]/g).test(item)); | |
| files.forEach(function(file) { | |
| fs.readFile(dirPath + '/' + file, function(error, data) { | |
| if (error) { |
| ffmpeg -i video.mp4 -vf scale=1280x720 -b:v 1024k \ | |
| -minrate 512k -maxrate 1485k -tile-columns 2 -g 240 -threads 8 \ | |
| -quality good -crf 33 -c:v libvpx-vp9 \ | |
| -pass 1 -speed 4 -strict -2 video.webm && \ | |
| ffmpeg -i video.mp4 -vf scale=1280x720 -b:v 1024k \ | |
| -minrate 512k -maxrate 1485k -tile-columns 2 -g 240 -threads 8 \ | |
| -quality good -crf 33 -c:v libvpx-vp9 \ | |
| -pass 2 -speed 4 -strict -2 -y video.webm |
| var path = require('path'); | |
| var autoprefixer = require('autoprefixer'); | |
| var postcssFlexbugsFixes = require('postcss-flexbugs-fixes'); | |
| var webpack = require('webpack'); | |
| var HtmlWebpackPlugin = require('html-webpack-plugin'); | |
| var ExtractTextPlugin = require("extract-text-webpack-plugin"); | |
| var CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin'); | |
| var WatchMissingNodeModulesPlugin = require('../scripts/utils/WatchMissingNodeModulesPlugin'); | |
| var CopyWebpackPlugin = require('copy-webpack-plugin'); | |
| var paths = require('./paths'); |
| //////////////////////////////////////////////////////////// english // | |
| // ------------------------------- | |
| // -=> WR-reversePathDirection <=- | |
| // ------------------------------- | |
| // | |
| // A Javascript for Adobe Illustrator | |
| // by Wolfgang Reszel ([email protected]) | |
| // | |
| // Version 0.2 from 1.12.2004 | |
| // |