Skip to content

Instantly share code, notes, and snippets.

@noam-honig
noam-honig / changelog.ts
Created April 21, 2024 14:52
Chagelog / audit trail
import {
Entity,
FieldRef,
Fields,
FieldsRef,
getEntityRef,
IdEntity,
isBackend,
LifecycleEvent,
@noam-honig
noam-honig / todo tutorual simple css
Created October 2, 2022 10:29
todo tutorual simple css
body {
font-family: Arial, Helvetica, sans-serif;
background-color: #f5f5f5;
display: flex;
justify-content: center;
font-size:x-large
}
input{
font-size: x-large;
min-width: 18px;
@noam-honig
noam-honig / gist:4621f19e66b3448aff30c0485be985cb
Last active December 13, 2021 14:53
dynamically load entities
import glob from 'glob';
import path from 'path';
for (const type of ["entity", "controller"]) {
for (const ext of ["js", "ts"]) {
for (const file of glob.sync(`src/**/*.${type}.${ext}`)) {
require(path.resolve(file))
}
}
}
@noam-honig
noam-honig / generate-test-data.sql
Created November 30, 2021 04:05
Anonymize relational data Sql Scripts
create table Person(
social_security_number int,
name varchar(50)
)
create table transactions(
person_social_security_number int,
month int,
amount decimal
)
@noam-honig
noam-honig / .gitignore
Created October 20, 2021 10:49
Basic typescript express sttartup project
# See http://help.github.com/ignore-files/ for more about ignoring files.
# compiled output
/dist
/tmp
/out-tsc
# Only exists if Bazel was run
/bazel-out
# dependencies
@noam-honig
noam-honig / tasks.json
Created October 7, 2021 14:19
Tasks json to use when developer remult with react
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "dev-react",
"problemMatcher": [
"$tsc-watch"
],
"label": "npm: dev-react",
@noam-honig
noam-honig / remult-setup.diff
Created October 7, 2021 04:54
remult-setup.diff
diff --git a/package.json b/package.json
index 3bb8620..f6b1b47 100644
--- a/package.json
+++ b/package.json
@@ -4,6 +4,8 @@
"scripts": {
"ng": "ng",
"start": "ng serve",
+ "dev-node": "ts-node-dev --project tsconfig.server.json src/server/",
+ "dev-ng": "ng serve --proxy-config proxy.conf.json --open",
@noam-honig
noam-honig / angular.json
Created October 4, 2021 06:23
how to configure angular not to create tests on create component
"projects": {
"hug-moms": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"prefix": "app",
"schematics": {
"@schematics/angular:component": {
"style": "scss",
"skipTests": true
@noam-honig
noam-honig / tasks.json
Created March 22, 2021 17:28
Vs Code Config to run dev-ng and dev-node together
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "dev-ng",
"problemMatcher": [
"$tsc-watch"
],
"label": "npm: dev-ng",
@noam-honig
noam-honig / DatabaseUpgradeBase.cs
Created December 25, 2019 12:00
DatabaseUpgradeBase.cs
using ENV.Data;
using ENV.Data.DataProvider;
using Firefly.Box.Data.Advanced;
using Firefly.Box.Data.DataProvider;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;