Skip to content

Instantly share code, notes, and snippets.

Avatar

Valentin Cocaud EmrysMyrddin

View GitHub Profile
View useDnD.js
const useDnD = ({ onStart, onMove, onComplete }) => {
const [draging, setDraging] = useState(false)
const handleDragStart = useCallback(() => {
setDraging(true)
// [Record starting point]
onStart ?? onStart()
}, [setDraging, onStart])
const handleDragMove = useCallback(() => {
View dnd.jsx
const DnD = () => {
const [draging, setDraging] = useState(false)
const handleDragStart = useCallback(() => {
setDraging(true)
// [Record starting point]
}, [setDraging])
const handleDragMove = useCallback(() => {
// [Calc the current position]
View hasura-action-login-query.graphql
{
login(username: "Valentin", password: "MotDePasseSecret") {
token
user {
id
username
}
}
}
View hasura-action-login.graphql
Query {
login(suername: String!, password: String!): UserAuthentication
}
type UserAuthentication {
token: String!
user: user!
}
View .vscode
{
"explorer.openEditors.visible": 0,
"editor.fontFamily": "Operator Mono, Menlo, Monaco, 'Courier New', monospace",
"window.zoomLevel": 1,
"workbench.colorTheme": "Oceanic Next Italic",
"editor.fontSize": 12,
"javascript.validate.enable": false,
"flow.useNPMPackagedFlow": true,
"editor.renderIndentGuides": false,
"files.autoSave": "afterDelay",
@EmrysMyrddin
EmrysMyrddin / dashboard.json
Last active Jun 23, 2017
Dashboard layout format
View dashboard.json
{
"name": "Dahsboard 1",
"description": "Some description",
"rows": 20,
"cols": 20,
"styles" : {
"primary-color": "#FFF",
"secondary-color": "#F00",
"background-color": "#000",
"font-family": "Roboto"
@EmrysMyrddin
EmrysMyrddin / availablePlugins.js
Last active Jun 13, 2017
Available plugins liste format
View availablePlugins.js
{
plugins: [
{
"name": "Plugin 1",
"description": "A short description for documentation purpose",
"elementName": "plugin-1",
"icon": "picture_in_picture_alt",
"props": [
{
"name": "prop1",
View gist:69b8ca0df9a322a682e0a768ff1fdcd8
for(TestStep step : listOfTestStep)
{
WsdlTestStep stepWithConfig;
SamplerTestStep stepWithRequest;
if(setp instanceOf WsdlTestStep) stepWithConfig = (WsdlTestStep) step
if(setp instanceOf SampleTestStep) stepWithRequest = (SampleTestStep) step
//Tu fait des trucs ma bite
if(stepWithConfig) {
//Tu fait des trucs mon zboub mais que si c'est du WsdlTestStep