Skip to content

Instantly share code, notes, and snippets.

View frmokoena's full-sized avatar

Rethabile frmokoena

  • Pretoria, South Africa
View GitHub Profile
@ciiqr
ciiqr / zod-optional-null.ts
Last active October 15, 2025 19:24
zod optional/nullable/nullish differences
// zod schema
z.object({
// valid if string or:
optional: z.string().optional(), // field not provided, or explicitly `undefined`
nullable: z.string().nullable(), // field explicitly `null`
nullish: z.string().nullish(), // field not provided, explicitly `null`, or explicitly `undefined`
});
// type
{
namespace NumberGenerators {
public class UniqueNumberGenerator
{
int value;
public UniqueNumberGenerator(int value)
{
this.value = value;
}
public Nullable<int> NextId()
@filipelenfers
filipelenfers / installJdkTarGzUbuntu.sh
Last active September 19, 2025 06:18
Install JDK from tar.gz Ubuntu
#Login as root
sudo su
#create jdk directory
mkdir /opt/jdk
#uncompress, change to your file name
tar -zxf jdk-8u5-linux-x64.tar.gz -C /opt/jdk
#check if files are there
@davidfowl
davidfowl / dotnetlayout.md
Last active October 11, 2025 13:36
.NET project structure
$/
  artifacts/
  build/
  docs/
  lib/
  packages/
  samples/
  src/
 tests/
@LeCoupa
LeCoupa / bash-cheatsheet.sh
Last active October 15, 2025 02:12
Bash CheatSheet for UNIX Systems --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@iros
iros / API.md
Created August 22, 2012 14:42
Documenting your REST API

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method: