Skip to content

Instantly share code, notes, and snippets.

@riivanov
riivanov / .etc.profile
Created February 4, 2023 20:30
/etc/profile with startup root apps modifications at the bottom
# /etc/profile
# Set our umask
umask 022
# Append "$1" to $PATH when not already in.
# This function API is accessible to scripts in /etc/profile.d
append_path () {
case ":$PATH:" in
*:"$1":*)
@riivanov
riivanov / todo.entity.ts
Created February 1, 2023 16:36
Todo entity that is both an ORM entity, and part of a GQL schema definition
import { Field, ID, InputType, ObjectType } from "type-graphql";
import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";
@ObjectType()
@Entity()
export class Todo {
@Field()
@PrimaryGeneratedColumn()
id: number;