Skip to content

Instantly share code, notes, and snippets.

@KittyMac
KittyMac / Build Skia on MacOS
Created January 11, 2022 05:34 — forked from velyan/Build Skia on MacOS
Steps to build Skia on MacOS
mkdir $HOME/deps
cd $HOME/deps
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
git clone https://github.com/google/skia.git
export PATH="${PWD}/depot_tools:${PATH}"
cd skia
python tools/git-sync-deps
//static
bin/gn gen out/release --args="is_official_build=true skia_use_system_expat=false skia_use_system_icu=false skia_use_libjpeg_turbo=false skia_use_system_libpng=false skia_use_system_libwebp=false skia_use_system_zlib=false skia_use_libwebp=false extra_cflags_cc=[\"-frtti\"]"
@KittyMac
KittyMac / gist:6618df4e05a7e11a6a1c48587f6fec2c
Created April 20, 2020 15:14
ponylang uuid only v4 no crypto
use "collections"
use "format"
use "itertools"
use "time"
class val UUID is Equatable[UUID]
"""
An UUID. Currently it can be used to generate UUIDs of versions 3, 4 and 5.
```
@KittyMac
KittyMac / gist:2b4a0e573620dbdf44705bc8e729fe1a
Created April 1, 2016 03:22
C# implementation of atof; replacement when necessary for float.TryPars; approximately 2.4x faster
private float atof(char[] num, ref int index) {
float integerPart = 0;
float fractionPart = 0;
float divisorForFraction = 1;
float sign = 1;
char numIndex;
/*Take care of +/- sign*/
if (num [index] == '-') {
index++;