Skip to content

Instantly share code, notes, and snippets.

@tudorels
tudorels / .editorconfig
Created December 4, 2023 12:02 — forked from SleepWalker/.editorconfig
tuya-localKey-demo
# EditorConfig is awesome: https://EditorConfig.org
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
@tudorels
tudorels / gist:d0b1e79bc2dad5aa4782508d4e760af8
Created October 4, 2023 10:56 — forked from neumino/gist:6554108
Filtering nested arrays with RethinkDB
r.table("test").filter( function(doc) {
return doc("adresses").contains(function(adress) {
return adress("city").eq("Paris")
})
})
/*
{
@tudorels
tudorels / snapsvg.vue
Created July 13, 2023 07:38 — forked from ap1969/snapsvg.vue
Using snap-svg in Vue 3
<template>
<q-page class="flex flex-center">
<div>
<svg id="svg" width="300" height="300"></svg>
</div>
<svg width="0" height="0">
<pattern
id="pattern"
patternUnits="userSpaceOnUse"
x="0"
@tudorels
tudorels / rethinkdb-import-export.md
Created January 19, 2023 08:21 — forked from coffeemug/rethinkdb-import-export.md
Description of import and export feature introduced in RethinkDB 1.7.

You can import data as follows:

# Import a JSON document into table `users` in database `my_db`
$ rethinkdb import -c HOST:PORT -f user_data.json --table my_db.users

# Import a CSV document
$ rethinkdb import -c HOST:PORT -f user_data.csv --format csv --table my_db.users
@tudorels
tudorels / goQueryTest.go
Created October 6, 2020 16:11 — forked from salmoni/goQueryTest.go
Parsing HTML in Go/Golang using goQuery to extract data from only one of multiple tables. Demonstrates nested Find statements.
package main
import (
"fmt"
"log"
"strings"
"github.com/PuerkitoBio/goquery"
)
@tudorels
tudorels / SQLServer-APIPost.sql
Created May 11, 2019 18:43 — forked from theorigin/SQLServer-APIPost.sql
SQL Server code to POST to an API
DECLARE @Object AS INT;
DECLARE @ResponseText AS VARCHAR(8000);
DECLARE @Body AS VARCHAR(8000) =
'{
"what": 1,
"ever": "you",
"need": "to send as the body"
}'
EXEC sp_OACreate 'MSXML2.XMLHTTP', @Object OUT;