Skip to content

Instantly share code, notes, and snippets.

View drujensen's full-sized avatar

Dru Jensen drujensen

View GitHub Profile
@drujensen
drujensen / cross_compile.md
Last active March 9, 2024 17:56
Cross Compile Crystal

Cross compile Crystal

These are instructions to cross compile crystal compiler on Ubuntu Server 20-04 on an ARM processor. This was tested on a Raspberry Pi 4 - 4Gb RAM.

From an Ubuntu 20-04 instance, first compile crystal from source. You will need to install crystal to compile crystal.

You can find the instructions here:

https://crystal-lang.org/reference/installation/on_debian_and_ubuntu.html

# All websocket content will run these transformations
pipeline :cable do
plug Amber::WebSockets::Server::Handler.new
end
routes :cable do
get "/cable", StaticChannel, :index
get "/cable/chat", ChatChannel, :index
get "/cable/presence", PresenceChannel, :index
end
@drujensen
drujensen / hello_world.sql
Created August 25, 2015 15:37
Framework Benchmarks Fortune Example
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `hello_world` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `hello_world`;
--
-- Table structure for table `fortune`
--
DROP TABLE IF EXISTS `fortune`;
/*!40101 SET @saved_cs_client = @@character_set_client */;