Skip to content

Instantly share code, notes, and snippets.

View Thecarisma's full-sized avatar
👽

A Thecarisma

👽
View GitHub Profile
@rust-play
rust-play / playground.rs
Created December 15, 2019 21:38
Code shared from the Rust Playground
pub fn reverse_string(s: &mut Vec<char>) {
if s.len() <= 1 {
return;
}
let mut i = 0;
let mut j = s.len() - 1;
while i != j && i < j {
s.swap(i, j);
i += 1;
j -= 1;
@isocroft
isocroft / credit-card-numbers-regex.js
Last active November 17, 2025 18:42
This JavaScript file contains regex for all popular credit/debit card numbers: both for local (Nigerian) cards and international
/*
Modified with more card regexs
See initial source: https://www.regular-expressions.info/creditcard.html
*/
let visa = /^4[0-9]{12}(?:[0-9]{3,4})?$/
let visa_local = /^4[19658][7684][0785][04278][128579](?:[0-9]{10})$/
let mastercard = /^(?:5[1-5][0-9]{2}|222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}$/
let mastercard_local = /^(?:5[13]99|55[35][19]|514[36])(?:11|4[10]|23|83|88)(?:[0-9]{10})$/
@caiorss
caiorss / Doxyfile
Last active March 8, 2021 17:11
C++ Doxygen Detailed Example
# Doxyfile 1.8.14
# This file describes the settings to be used by the documentation system
# doxygen (www.doxygen.org) for a project.
#
# All text after a double hash (##) is considered a comment and is placed in
# front of the TAG it is preceding.
#
# All text after a single hash (#) is considered a comment and will be ignored.
# The format is:
@Youngestdev
Youngestdev / Makefile-Unix.mk
Created September 12, 2018 02:58
Dynamic module makefile
# This makefiile generates the following dynamic libraries:
# - archiver
# - consoler
# - file_savant
# - mathic
# - string_savant
# - networker
# - parser
# - security
# - systemic
@toksdotdev
toksdotdev / Simple Lang 0.3.36 Release Note.md
Last active August 17, 2018 19:50
Simple Lang 0.3.36 Release Note

SimpleLang Release Note 0.3.36

We've come a long journey in ensuring that we draw closer to a stable 1.0 in coming months. We wouldn' forget to always rmemeber the ultimate goal of Simple, which is to

Over the last release cycle, we've emphasized on enabling a smoothe embedded integration between Simple and other languages such as C/C++ and javascript, including going live on our Official Website.

Installation

  • One-Line Installation: Installing simple hasn't been greater than before with the release of a the online installer. It has been out major goal oat ensuring that the installation process becomes shorter than before. This would be available on all x86 and x64 architecture on all the following OS namely:
  • Linux
  • Windows
@Thecarisma
Thecarisma / ptarget.h
Created July 10, 2018 20:47 — forked from ByteProject/ptarget.h
header for compiler and OS detection (portable C)
/*
* ptarget.h
*
* Coded by Stefan Vogt, revised Feb 18, 2011.
* Released under the FreeBSD license.
* http://www.byteproject.net
*
* header for compiler and OS detection
*
*/

The PATH is an important concept when working on the command line. It's a list of directories that tell your operating system where to look for programs, so that you can just write script instead of /home/me/bin/script or C:\Users\Me\bin\script. But different operating systems have different ways to add a new directory to it:

Windows

  1. The first step depends which version of Windows you're using:
  • If you're using Windows 8 or 10, press the Windows key, then search for and
@philipmat
philipmat / ConvertTo-Base64.ps1
Last active November 17, 2020 17:56
ConvertTo-Base64 - Powershell script
<#
.SYNOPSIS
Converts a file to BASE64 encoding and displays the encoded content.
.PARAMETER InputFile
The file to be converted to Base64. Displays the encoded string to output (see -ToJson)
.PARAMETER ToJson
Instead of displaying the raw Base64, it outputs a JSON-formatted object.
@kimwalisch
kimwalisch / int128.h
Created November 22, 2017 12:25 — forked from Bananattack/int128.h
A signed 128-bit integer type. Internally stores its data in Two's Complement within two unsigned 64-bit integer parts. Still needs more testing, but basic implementation is fairly complete.
#ifndef WIZ_UTILITY_INT128_H
#define WIZ_UTILITY_INT128_H
#include <cassert>
#include <cstdint>
#include <cstddef>
#include <cstring>
#include <cstdlib>
#include <utility>
#include <string>
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active January 17, 2026 01:54
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example