Skip to content

Instantly share code, notes, and snippets.

@temp3l
temp3l / firmware-sync
Last active December 20, 2016 22:26
sync esp8266 files on change
#!/bin/bash -xe
nmcut="node ../node_modules/nodemcu-tool/bin/nodemcu-tool.js"
terminal="xfce4-terminal --geometry=120x20+300+200"
$terminal -e "$nmcut --connection-delay 200 terminal </dev/null &>/dev/null &"
killSessions ()
{
pid=$(ps fax | grep nodemcu-tool | grep terminal|awk -F " " '{print $1}' )
echo "PID was: $pid"
if [ ! -z "$pid" ]; then
@temp3l
temp3l / supertrend.js
Last active February 19, 2022 22:48
super trend ohlc technicalindicators
//fork of https://gist.github.com/sedhuait/985f84afba07e170357a8b8fa0129ebb
const ATR = require('technicalindicators').ATR;
const HA = require('technicalindicators').HeikinAshi;
const moment = require('moment');
const _ = require('lodash');
const Super = function(result, { multiplier = 3, period = 7, is_ha = true } = {}) {
let open = [], close = [], high = [], low = [], volume=[], timestamp=[];
{
// Place your global snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
// Placeholders with the same ids are connected.
// Example:
"Print to console": {
"scope": "javascript,typescript",
*https://medium.com/@hintology/sdd-schema-driven-development-f1d232d73ea6
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://:::1/partner.schema.json#",
"title": "Partner",
"description": "business partner specification",
"type": "object",
"definitions": {
{
"definitions": {},
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://example.com/root.json",
"type": "object",
"title": "The Root Schema",
"required": [
"foo",
"nums",
"strings"

export { themes } from './theme2'; import { Appear, Image } from '@mdx-deck/components'; import { Invert, Split, SplitRight, FullScreenCode, Horizontal } from 'mdx-deck/layouts' import { CodeSurferLayout } from 'code-surfer'; import { RandomlyPlaced } from './components/RandomlyPlaced'; import { SlideIn, BlurIn, ZoomSteps } from './components/lib'; import TerminalFramed from './components/TerminalFramed'; import { TerminalStyle } from './components/layout/layout'; import {Coder} from './components/Coder' import SchemaSurferSimple from './components/schema-surfer-simple.mdx';

@temp3l
temp3l / sql-to-json.sh
Last active December 3, 2020 10:03
sql2json for mysql/oracle/mariadb .sql files (just parsing tables + columns)
#!/bin/bash
# Parses Mysql/Oracle/Mariadb sql files (Data and Schema-Dumps)
DICTIONARY_FILE=translationTable.json
# SQL_FILE=SQL_FULL_EXPORT.sql
# SQL_FILE=SQL_STAGING_SCHEMA.sql
# SQL_FILE=SQL_SMALL_EXPORT.sql
SQL_FILE=SQL_SCHEMA_EXPORT_CB.sql
SQLOUTFILE=.trash/translated.sql
JSONOUTFILE=.trash/propMap.json
{
"accountOwner": {
"$id": "#/definitions/accountOwner",
"type": "string",
"title": "accountOwner",
"description": "accountOwner description",
"maxLength": 300,
"default": "MIPO-Testk 29",
"examples": [
"Maier Can DE",
// just guessing
// converted: https://json-schema.org/draft/2019-09/links
export type JSONSchema7 = import('json-schema').JSONSchema7;
export type LinkDescriptionObject = {
anchor?: string;
anchorPointer?: string;
rel?: string | string[];
href?: string;