Skip to content

Instantly share code, notes, and snippets.

@igez
igez / firebase-firestore.go
Created March 21, 2024 01:49 — forked from tiebingzhang/firebase-firestore.go
An example Google Firebase Firestore client in Golang, with Create/Update/Read. ** Update the service_account.json file and project-id to yours before running.
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"cloud.google.com/go/firestore"
"google.golang.org/api/option"
-------------------------------------
Translated Report (Full Report Below)
-------------------------------------
Process: JavaAppLauncher [6113]
Path: /Users/USER/Library/Application Support/Steam/*/Project Zomboid.app/Contents/MacOS/JavaAppLauncher
Identifier: Project Zomboid
Version: Alpha (Alpha)
Code Type: X86-64 (Native)
Parent Process: launchd [1]
@igez
igez / index.html
Last active August 18, 2021 10:54
test leaflet d3
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<style>
.control {
cursor: ew-resize;
}
#map {
width: 100vw;
import * as crypto from 'crypto';
export const CryptService = {
encrypt: (text: string) => {
if (text == null) {
return null;
}
try {
// random initialization vector
import * as crypto from 'crypto';
export const CryptService = {
encrypt: (text) => {
try {
// random initialization vector
var iv = crypto.randomBytes(12);
// random salt
var salt = crypto.randomBytes(64);
@igez
igez / test-1.js
Last active September 23, 2020 07:53
const distances = [
[1, 42, 33, 49],
[11, 33, [[1, 13, 4], [4, 13, 3]], 91],
[23, 42, 17, 19],
[42, [[32, 11], [12, 9]], 41, 51, 3],
[4, [[13, 3, 1, 4], [19]], 1],
[99, 14, 59]
]
// Distances it’s an array of routes in the case of [a, b, [[c][d]]]
@igez
igez / import.sh
Created July 16, 2020 12:55
Import mongodb json files from docker container to HOST
MONGO_PORT=3001
MONGO_DB=meteor
ls -1 *.json | sed 's/.json$//' | while read col; do \
mongoimport -h host.docker.internal:$MONGO_PORT -d $MONGO_DB -c $col < $col.json; \
done
@igez
igez / readme.md
Last active February 21, 2020 05:03
pngdefry install step on Centos 8
@igez
igez / data-example.json
Last active November 5, 2019 13:48 — forked from swayvil/data-example.json
D3.js collapsing tree with boxes
{
"tree" : {
"nodeName" : "NODE NAME 1",
"name" : "NODE NAME 1",
"type" : "type3",
"code" : "N1",
"label" : "Node name 1",
"version" : "v1.0",
"link" : {
"name" : "Link NODE NAME 1",
@igez
igez / index.html
Last active June 29, 2018 08:35
Shrink group of SVG element and resize its radius & viewport while maintain they relative position
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>