Skip to content

Instantly share code, notes, and snippets.

@lavantien
lavantien / SortingAlgsBenchmarks.c
Created September 30, 2018 08:33
A Benchmarking Program for various Sorting Algorithms writen in C.
// Sorting Algorithms Benchmarks v0.0
// Created by LaVanTien
// 02/01/2016 6:00 AM
// Compiled at C language - ISO C11
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <time.h>
#define TEMPSIZE 10000

E DAJE

Ci hai creduto davvero???? Ma io che ne so'!!!

Se lo sapevo lo dicevo a te???

Se hai cliccato lascia un TUO commento nel muro della vergogna

@denisgolius
denisgolius / generate-ssh-key.sh
Created October 4, 2018 06:55 — forked from grenade/01-generate-ed25519-ssh-key.sh
Correct file permissions for ssh keys and config.
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/id_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/github_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/mozilla_rsa
@aliesbelik
aliesbelik / benchmarking-tools.md
Last active May 21, 2024 10:25
Benchmarking & load testing tools
@juxuanu
juxuanu / pacman-cdn-repos.md
Created January 18, 2024 19:28
Global CDNs for ArchLinux repositories

/etc/pacman.d/mirrorlist:

Server = https://cloudflaremirrors.com/archlinux/$repo/os/$arch
Server = https://mirrors.gandi.net/archlinux/$repo/os/$arch
Server = https://mirror.rackspace.com/archlinux/$repo/os/$arch 
Server = https://mirror.facebook.net/archlinux/$repo/os/$arch

No need for Reflector 😉

@ciiqr
ciiqr / zod-optional-null.ts
Last active May 21, 2024 10:19
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
{
@ronanguilloux
ronanguilloux / pre-commit
Last active May 21, 2024 10:17 — forked from cjsaylor/pre-commit
phplint + phpcs + php-cs-fixer PHP-related pre-commit git hook (needs to add squizlabs/php_codesniffer & fabpot/php-cs-fixer to your composer.json)
#!/bin/sh
# @source: https://gist.github.com/ronanguilloux/11f6a788358577474ab4
# @link http://tech.zumba.com/2014/04/14/control-code-quality/
PROJECT=`php -r "echo dirname(dirname(dirname(realpath('$0'))));"`
STAGED_FILES_CMD=`git diff --cached --name-only --diff-filter=ACMR HEAD | grep \\\\.php`
# Determine if a file list is passed
@laytan
laytan / compile.sh
Last active May 21, 2024 10:13
Odin, GLFW & Vulkan boilerplate for Drawing a Triangle on https://vulkan-tutorial.com
#!/usr/bin/env sh
glslc shader.vert -o vert.spv
glslc shader.frag -o frag.spv
@swillits
swillits / Keycodes.swift
Last active May 21, 2024 10:09
Swift Keyboard Keycodes
struct Keycode {
// Layout-independent Keys
// eg.These key codes are always the same key on all layouts.
static let returnKey : UInt16 = 0x24
static let enter : UInt16 = 0x4C
static let tab : UInt16 = 0x30
static let space : UInt16 = 0x31
static let delete : UInt16 = 0x33
static let escape : UInt16 = 0x35

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH