Install the following requirements:
brew info zeromq
npm install zmq
npm install socket.io
gem install ffi-rzmq
Within the app directory run the following commands in different panes.
ruby worker.rb
Install the following requirements:
brew info zeromq
npm install zmq
npm install socket.io
gem install ffi-rzmq
Within the app directory run the following commands in different panes.
ruby worker.rb
I recently got a new Macbook Pro and wanted to document how I setup my PHP environment. I like full control of how PHP is built and I usually build it from source. I do this because I often add custom extensions and modules not found in the common PHP OSX installers. If your looking for a easier method than building from source try https://php-osx.liip.ch/.
NOTE: This post assumes you are running a fresh install of MacOS Sierra 10.12.16 with System Integrity Protection disabled. If you don't know how to disable it just boot into recovery mode and open a terminal and type
csrutil disable
, or google search it :) This post also assumes you are using Zsh instead of Bash shell. If you are using Bash you can replace anytime you see~/.zshrc
with~/.bashrc
.
First lets get some of the prerequisites. Start by grabbing the command line tools neccessary:
xcode-select --install
The following steps will describe how to build PHP from source including PHP's Apache module as it is no longer part of macOS starting with macOS Monterey.
If this is for a development environment, you can simply install PHP with Homebrew using the command brew install php
. This guide is for cases where you need a more portable PHP without heavily dependening on external libraries.
#!/bin/bash | |
set -euo pipefail | |
IFS=$'\n\t' | |
# Ubuntu Server | |
# Run like (without sudo) - bash install_lamp.sh | |
# Script should auto terminate on errors | |
export DEBIAN_FRONTEND=noninteractive |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Sine Wave</title> | |
<script type="text/javascript"> | |
function showAxes(ctx,axes) { | |
var width = ctx.canvas.width; | |
var height = ctx.canvas.height; | |
var xMin = 0; |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Sine Wave</title> | |
<script type="text/javascript"> | |
function showAxes(ctx,axes) { | |
var width = ctx.canvas.width; | |
var height = ctx.canvas.height; | |
var xMin = 0; |
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
""" | |
Created on July 7 2020 | |
@author: Pete Midi | |
""" | |
import mido | |
import numpy as np |
#include "zmq.h" | |
#include "swoole.h" | |
#include "php_swoole_cxx.h" | |
#include "swoole_socket.h" | |
#include "swoole_reactor.h" | |
namespace swoole { | |
using network::Socket; |
<?php | |
// based on Stone FastCGI https://github.com/StoneGroup/stone copyright MIT according to it's composer.json | |
class FastCGIConnection | |
{ | |
private $server; | |
private $from_id; | |
private $fd; |