Skip to content

Instantly share code, notes, and snippets.

View zachleigh's full-sized avatar

Zach Leigh zachleigh

View GitHub Profile
@seyfer
seyfer / negabase.php
Created March 9, 2017 04:18 — forked from CMCDragonkai/negabase.php
PHP: Negative Base Conversion from Base 10 Decimal
<?php
/**
* Negabase
* To convert a decimal to negative base.
* Divide the number by the negative base.
* Acquire the whole number quotient and remainder.
* If the remainder is negative, add 1 to the quotient and add the absolute value of the base to the remainder.
* Divide the quotient by the negative base... rinse and repeat until the quotient is 0.
* Aggregate the remainders in reverse (as a stack), and you have your negative base representation.
@ProjectCleverWeb
ProjectCleverWeb / centered.md
Last active June 2, 2025 19:04
Example of how to do centered text and images in Githb Flavored Markdown
@terrancesnyder
terrancesnyder / regex-japanese.txt
Created November 7, 2011 14:05
Regex for Japanese
Regex for matching ALL Japanese common & uncommon Kanji (4e00 – 9fcf) ~ The Big Kahuna!
([一-龯])
Regex for matching Hirgana or Katakana
([ぁ-んァ-ン])
Regex for matching Non-Hirgana or Non-Katakana
([^ぁ-んァ-ン])
Regex for matching Hirgana or Katakana or basic punctuation (、。’)