This sketch is outdated. Please refer to https://github.com/prisma/nexus-prisma for current spec & status.
Here is a GraphQL object manually projecting fields from the model layer. Assume the parent returned data of a project model.
objectType({| const { exec, spawn } = require("child_process"); | |
| const fs = require("fs"); | |
| const { promisify } = require("util"); | |
| import { WebSocket } from "ws"; | |
| async function getWebSocketDebuggerUrl() { | |
| const res = await fetch("http://localhost:9229/json"); | |
| const data = await res.json(); | |
| return data[0].webSocketDebuggerUrl; | |
| } |
| 'use client' | |
| import React, { useRef, useState, useEffect } from 'react'; | |
| import { useWavesurfer } from '@wavesurfer/react'; | |
| import * as Tone from 'tone'; | |
| export default function Page() { | |
| const containerRef = useRef<HTMLDivElement>(null); | |
| const audioRef = useRef<HTMLAudioElement | null>(null); | |
| const [playing, setPlaying] = useState(false); | |
| const pitchShift = useRef<Tone.PitchShift | null>(null); |
Here is a GraphQL object manually projecting fields from the model layer. Assume the parent returned data of a project model.
objectType({| #Given a video of any aspect ratio this script will extract center cropped thumbnails at 299x299. | |
| #Useful for gathering image training data. | |
| #Assumes ffmpeg 3.3.2 | |
| #If you get an error about exact that means you are using an older version of ffmpeg | |
| #Simply remove the :exact=1. | |
| #This will make it work, but may cause the output size to be off by a pixel | |
| #Script assumes you are downsampling. | |
| #!/bin/bash |
There are certain files created by particular editors, IDEs, operating systems, etc., that do not belong in a repository. But adding system-specific files to the repo's .gitignore is considered a poor practice. This file should only exclude files and directories that are a part of the package that should not be versioned (such as the node_modules directory) as well as files that are generated (and regenerated) as artifacts of a build process.
All other files should be in your own global gitignore file:
.gitignore in your home directory and add any filepath patterns you want to ignore.Note: The specific name and path you choose aren't important as long as you configure git to find it, as shown below. You could substitute
.config/git/ignorefor.gitignorein your home directory, if you prefer.
| var colorArray = ['#FF6633', '#FFB399', '#FF33FF', '#FFFF99', '#00B3E6', | |
| '#E6B333', '#3366E6', '#999966', '#99FF99', '#B34D4D', | |
| '#80B300', '#809900', '#E6B3B3', '#6680B3', '#66991A', | |
| '#FF99E6', '#CCFF1A', '#FF1A66', '#E6331A', '#33FFCC', | |
| '#66994D', '#B366CC', '#4D8000', '#B33300', '#CC80CC', | |
| '#66664D', '#991AFF', '#E666FF', '#4DB3FF', '#1AB399', | |
| '#E666B3', '#33991A', '#CC9999', '#B3B31A', '#00E680', | |
| '#4D8066', '#809980', '#E6FF80', '#1AFF33', '#999933', | |
| '#FF3380', '#CCCC00', '#66E64D', '#4D80CC', '#9900B3', | |
| '#E64D66', '#4DB380', '#FF4D4D', '#99E6E6', '#6666FF']; |