Skip to content

Instantly share code, notes, and snippets.

View Glyphack's full-sized avatar
🔨
Building Enderpy

Shaygan Hooshyari Glyphack

🔨
Building Enderpy
View GitHub Profile
@cristaloleg
cristaloleg / golangci.yaml
Created March 28, 2023 07:01
Go linters configuration, the right version.
# See: https://olegk.dev/go-linters-configuration-the-right-version
run:
# Depends on your hardware, my laptop can survive 8 threads.
concurrency: 8
# I really care about the result, so I'm fine to wait for it.
timeout: 30m
# Fail if the error was met.
@squiidz
squiidz / btree.c
Last active January 31, 2023 15:22
Btree implementation in C
#include "stdio.h"
#include "stdlib.h"
#define M 3
typedef struct _node {
int n; /* n < M No. of keys in node will always less than order of B tree */
int keys[M - 1]; /*array of keys*/
struct _node *p[M]; /* (n+1 pointers will be in use) */
} node;
@ericandrewlewis
ericandrewlewis / index.md
Last active June 6, 2024 01:43
C++ Pointer Tutorial

C++ Pointer Tutorial

Because pointers can be ugh

"Regular" variables (not pointers)

To understand a pointer, let's review "regular" variables first. If you're familiar with a programming language without pointers like JavaScript, this is what you think when you hear "variable".

When declaring a variable by identifier (or name), the variable is synonymous with its value.

@afternoon
afternoon / rename_js_files.sh
Created February 15, 2014 18:04
Rename .js files to .ts
find app/src -name "*.js" -exec sh -c 'mv "$0" "${0%.js}.ts"' {} \;