Skip to content

Instantly share code, notes, and snippets.

View sdirix's full-sized avatar

Stefan Dirix sdirix

  • EclipseSource GmbH
View GitHub Profile
import { useRef, useState, memo, useEffect } from 'react';
import PropTypes from 'prop-types';
const noop = () => {};
const DEFAULT_DEBOUNCE_TIMEOUT = 330; // ms
const Debounced = ({ children, value, onChange, timeout }) => {
const timeoutIdRef = useRef(null);
const [innerValue, setInnerValue] = useState(value);
import Autocomplete from 'react-autocomplete';
import { rankWith, scopeEndsWith } from '@jsonforms/core';
import { JsonForms, withJsonFormsControlProps } from '@jsonforms/react';
import { materialCells, materialRenderers } from '@jsonforms/material-renderers';
import React from "react"
const schema = {
"type": "object",
"title": "The Root Schema",
"description": "The root schema comprises the entire JSON document.",
@jankeromnes
jankeromnes / spectrum-to-discourse.js
Last active July 8, 2021 12:45
Quick-and-dirty Node.js hack to export Spectrum threads & import them to Discourse
const fs = require('fs');
const https = require('https');
const querystring = require('querystring');
// All image URLs, in case you want to re-import them to Discourse (this script just links Discourse to the Spectrum images)
let images = [];
let comments = {};
// Map Spectrum usernames to existing Discourse usernames, in order to post comments as actual users (otherwise this script posts comments as user 'discobot', but mentions the Spectrum username in first line of comment. You can also fix it manually afterwards.)
const discourseUsers = {
@bsara
bsara / git-ssh-auth-win-setup.md
Last active May 23, 2025 20:07
Setup SSH Authentication for Git Bash on Windows

Setup SSH Authentication for Git Bash on Windows

Prepararation

  1. Create a folder at the root of your user home folder (Example: C:/Users/uname/) called .ssh.
  2. Create the following files if they do not already exist (paths begin from the root of your user home folder):
  • .ssh/config