Skip to content

Instantly share code, notes, and snippets.

View cameronwlewis's full-sized avatar

Cameron Lewis cameronwlewis

View GitHub Profile
@cameronwlewis
cameronwlewis / 1-EU5_v1.3_macOS_guide_README.md
Last active August 3, 2026 14:59
Play Europa Universalis V 1.3 with 3D terrain on Apple Silicon Macs — free & open-source (Sikarugir + Wine 11.13 + native Vulkan), with a working Steam client window

Play Europa Universalis V 1.3 on your Mac — with 3D terrain 🗺️

For Apple Silicon Macs (M1–M5). Free. No CrossOver license needed.

EU5 has no Mac version, and the popular CrossOver/Wine recipes broke with patch 1.3 "Pavia" (the game hangs or silently dies). This guide gets EU5 1.3 running natively-fast on your Mac — including the 3D terrain, which even working setups usually have disabled — and with a fully working, visible Steam client (no black window, no engine-swapping).

It was worked out on an M5 Max running macOS 26, and every step below was validated on

/*
* Get sentiment from Google Cloud Natural Language API
*/
var getSentiment = function(text) {
var apiKey = PropertiesService.getScriptProperties().getProperty("apiKey")
var url = "https://language.googleapis.com/v1/documents:analyzeSentiment?key=%KEY".replace("%KEY", apiKey)
var data = {
document: {
language: "en-us",
class FirstClass:
def __init__(self, value):
self.value = value
class SecondClass:
def __init__(self):
self.a = 'a'
self.b = FirstClass('b')
def confuse_me(self):
@cameronwlewis
cameronwlewis / README.md
Created December 20, 2018 08:12 — forked from twolfson/README.md
How Python modules are resolved

Python modules have 2 syntaxes for importing.

import x
from x import y

import x

Absolute imports are used for importing top-level modules and only top level modules. These are ones that are globally installed, either inside of Python core or via a package manager (e.g. pip).

@cameronwlewis
cameronwlewis / 0_reuse_code.js
Created March 26, 2017 01:47
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
We couldn’t find that file to show.
@cameronwlewis
cameronwlewis / install_psql_php.sh
Created February 3, 2017 08:47 — forked from giorgiofellipe/install_psql_php.sh
Install PHP PGSQL extensions on Mac OS X Yosemite (change PHP_VER with your PHP version)
PHP_VER="5.5.14"
# Check if extension exists first
php -m | grep pgsql
# Update brew and install requirements
brew update
brew install autoconf
# Download PHP source and extract
@cameronwlewis
cameronwlewis / install_psql_php.sh
Created February 3, 2017 08:46 — forked from doole/install_psql_php.sh
Install PostgreSQL PHP extensions on Mac OS X
#!/bin/bash
# Install Xcode Command Line Tools first (required)
xcode-select --install
# Check PHP version `php --version`
PHP_VER=$(php -v | head -1 | awk '{ print $2 }')
# Extensions directory (default: empty string)
EXT_DIR=""