This file contains 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
/** | |
* Dropzone Default Language Translate pack | |
* | |
* @lang Russian | |
* @lang-ISO ru-RU | |
* | |
* @author ValeriaVG | |
* @license Public Domain | |
* @see https://gist.github.com/ValeriaVG/5ffcf92c98216e44e92d3db6a36ff838 |
This file contains 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
Dropzone.autoDiscover = false; | |
$(function() { | |
// Now that the DOM is fully loaded, create the dropzone, and setup the | |
// event listeners | |
var myDropzone = new Dropzone("#my-dropzone", { | |
dictDefaultMessage: "Перетащите файлы для загрузки в это поле", | |
dictFallbackMessage: "К сожалению, ваш браузер не поддерживает Drag'n'Drop", | |
dictFallbackText: "Пожалуйста, воспользуйтесь старой доброй формой для загрузки", | |
dictFileTooBig: "Файл слишком большой({{filesize}}MB). Максимальный допустимый размер файла {{maxFilesize}}MB", | |
dictInvalidFileType: "Вы не можете загружать файлы этого типа.", |
This file contains 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
#!/usr/bin/env node | |
var util = require('util'), | |
spawn = require('child_process').spawn, | |
permissions = spawn('chmod',['+x',require('path').resolve(__dirname,'./index.sh')],{ stdio: [ | |
0, // Use parent's stdin for child | |
'pipe', // Pipe child's stdout to parent | |
'pipe' | |
]}) | |
cmd = spawn(require('path').resolve(__dirname,'./index.sh'), [process.argv[2]],{shell: true}); // the second arg is the command | |
// options |
This file contains 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
<div id="root"></div> |
This file contains 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
npm init react-app my-app | |
cd my-app | |
npm run eject |
This file contains 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 './index.css'; | |
import App from './App'; | |
import * as serviceWorker from './serviceWorker'; | |
ReactDOM.render(<App />, document.getElementById('root')); | |
// If you want your app to work offline and load faster, you can change | |
// unregister() to register() below. Note this comes with some pitfalls. |
This file contains 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
npm -g i serve | |
npm run build | |
serve -s build |
This file contains 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, { | |
createContext, | |
useState, | |
useContext, | |
useEffect, | |
PropsWithChildren, | |
useCallback, | |
} from "react"; | |
import { ExecutionResult, GraphQLError } from "graphql"; | |
import { GraphQLQuery, GraphQLVariables } from "types"; |
This file contains 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 { IconDefinition, icon, parse } from "@fortawesome/fontawesome-svg-core"; | |
import { h, Ref } from "preact"; | |
export default function FontAwesomeIcon({ | |
forwardedRef, | |
...props | |
}: FontAwesomeIconProps) { | |
const { | |
icon: iconArgs, | |
mask: maskArgs, |
This file contains 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 { Plugin, PluginRenderScripts } from "$fresh/server.ts"; | |
import createEmotionServer from '@emotion/server/create-instance' | |
import { cache } from '@emotion/css' | |
const { extractCritical } = createEmotionServer(cache) | |
const main = `data:application/javascript,import hydrate from "${new URL("./main.ts", import.meta.url).href | |
}";export default function(state) { hydrate(state); }`; | |
const emotion: Plugin = { |