Skip to content

Instantly share code, notes, and snippets.

View griels's full-sized avatar

Ellis Breen griels

View GitHub Profile
#!/usr/bin/env bash
set -euo pipefail
# --- Config (override via env vars if you want) ---
ENV_NAME="${ENV_NAME:-mlc-chat-venv}"
PORT="${PORT:-10000}"
PLIST="${HOME}/Library/LaunchAgents/com.user.openwebui.plist"
LOGDIR="${HOME}/Library/Logs"
LABEL="com.user.openwebui"
@griels
griels / osx-vnc-hidden-options.md
Created May 21, 2021 09:35 — forked from jabenninghoff/osx-vnc-hidden-options.md
RemoteManagement "hidden" options

macOS Sierra (and possibly earlier) has some "hidden" screen sharing options:

If you're connecting to VNC using ssh tunneling, you can force macOS to listen only on localhost:

sudo defaults write /Library/Preferences/com.apple.RemoteManagement.plist VNCOnlyLocalConnections -bool yes

In newer versions of macOS, screen sharing will automatically re-lock the screen when you disconnect if it was locked when you first connected. To change this behavior, use:

sudo defaults write /Library/Preferences/com.apple.RemoteManagement RestoreMachineState -bool NO

@griels
griels / chamber.sh
Created October 3, 2020 10:30 — forked from fkorotkov/chamber.sh
Script to run a command in an isolation
#!/usr/bin/env bash
set -e
# list of Nix packages to install
NIX_PACKAGES="darwin.shell_cmds"
XCODE_DERIVED_DATA="$HOME/Library/Developer/Xcode/DerivedData"
WORKING_DIRECTORY=$PWD
@griels
griels / pep484transform.py
Created February 20, 2020 16:37 — forked from davidhalter/pep484transform.py
Jedi generates Pep 484 type annotations.
"""
Transforms a normal Python file to pep484 annotations using Jedi.
Usage:
pep484transform.py <file> [-d]
Options:
-d, --debug Show Jedi's debug output.
"""
from os.path import abspath
@griels
griels / pipeline.gdsl
Created April 26, 2019 13:22 — forked from ggarcia24/pipeline.gdsl
GDSL supporting pipeline declarative
//The global script scope
def ctx = context(scope: scriptScope())
//What things can be on the script scope
contributor(ctx) {
method(name: 'pipeline', type: 'Object', params: [body: Closure])
property(name: 'params', type: 'org.jenkinsci.plugins.workflow.cps.ParamsVariable')
property(name: 'env', type: 'org.jenkinsci.plugins.workflow.cps.EnvActionImpl.Binder')
property(name: 'currentBuild', type: 'org.jenkinsci.plugins.workflow.cps.RunWrapperBinder')
property(name: 'scm', type: 'org.jenkinsci.plugins.workflow.multibranch.SCMVar')
@griels
griels / pycbc-winbuild.py
Last active November 6, 2018 22:29 — forked from mnunberg/pycbc-winbuild.py
Build script for Python couchbase client.
#!/usr/bin/env python
import os
import os.path
import sys
import argparse
import urllib2
import zipfile
import shutil
import glob
import subprocess
@griels
griels / README.markdown
Created July 18, 2017 13:26 — forked from jasoncodes/README.markdown
Run VMware Fusion headless at Mac OS system startup

Run VMware Fusion headless at Mac OS system startup.

I heard you like headless VMs on your Mac so I wrote this script for your launchds.

Assumptions

  • Tested on Mac OS X 10.6.4 with VMware Fusion 2.0.5 and 3.1.1.
  • A interactive user automatically logs into the system at startup. I had some issues trying to get this running without an interactive user logged in. I automatically log in for Airfoil Speakers anyway.
  • Your virtual machines live in /Virtual Machines