Skip to content

Instantly share code, notes, and snippets.

@Sydney-o9
Sydney-o9 / machine.js
Created August 28, 2020 05:58
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@Sydney-o9
Sydney-o9 / json-date.swift
Created July 16, 2017 08:00
SWIFT: Create Json string from Date
let dateFormatter = DateFormatter()
let enUSPosixLocale = Locale(identifier: "en_US_POSIX")
dateFormatter.locale = enUSPosixLocale
dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ssZZZZZ"
let createdDate = dateFormatter.string(from: Date())
@Sydney-o9
Sydney-o9 / install-mongodb-mac-os-x.md
Last active June 30, 2023 08:58
Install MongoDB on Mac OS X without brew

1. Download latest source

# Get latest from MongoDB website
$ curl -O https://fastdl.mongodb.org/osx/mongodb-osx-x86_64-3.4.6.tgz
$ tar -zxvf mongodb-osx-x86_64-3.4.6.tgz
$ mkdir -p mongodb
$ cp -R -n mongodb-osx-x86_64-3.4.6/ mongodb
$ sudo mv mongodb /usr/local
@Sydney-o9
Sydney-o9 / install-php-on-mac-os-from-source.sh
Last active October 16, 2023 03:37
Install PHP on Mac OSX from source
cd /tmp && \
wget http://au1.php.net/distributions/php-5.6.12.tar.gz -O php-current.tar.gz > /dev/null 2>&1
mkdir php-current && tar -zxvf php-current.tar.gz -C /tmp/php-current --strip-components=1 > /dev/null 2>&1 && \
cd php-current
./configure \
--with-apxs2=/usr/sbin/apxs \
--with-mysql \
--with-mysqli \