Skip to content

Instantly share code, notes, and snippets.

View cybersamx's full-sized avatar

Samuel Chow cybersamx

  • Los Angeles, Ca
  • 04:36 (UTC -07:00)
View GitHub Profile
@NightMachinery
NightMachinery / battery_limit.zsh
Last active April 16, 2024 14:57
A guide on limiting macOS battery charging to at most 80%.
# Apple Silicon laptops with firmware > 13.0 have a native charge threshold that does not required any userspace daemon running.
# This native limit works even when the laptop is sleeping or powered off therefore it is preferable to the userspace daemon.
# Nonetheless, it only works with fixed thresholds (80% as upper limit and 70% as lower limit).
# CHWA key is the one used to enable/disable the native limit. 01 = 80% limit, 00 = no limit
##
typeset -g smc_command="/usr/local/bin/smc"
typeset -g smc_charge_limit_key="CHWA"
typeset -g smc_charge_limit_status_on="01"
typeset -g smc_charge_limit_status_off="00"
@davidkelley
davidkelley / network.template
Created April 13, 2014 15:12
AWS Cloudformation that launches Private and Public Subnets inside a configured VPC complete with a Bastion Host
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "Creates networking infrastructure.",
"Parameters" : {
"BastionKeyName" : {
"Description" : "Name of an existing EC2 KeyPair to enable SSH access to the bastion host",
"Type" : "String",
@kevinelliott
kevinelliott / osx-10.9-setup.md
Last active November 6, 2020 14:19 — forked from juev/gist:3124344
Clean Install – Mac OS X 10.9 Mavericks

Mac OS X 10.9 Mavericks

Custom recipe to get OS X 10.9 Mavericks running from scratch, setup applications and developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install.

Install Software

The software selected is software that is "tried and true" --- software I need after any fresh install. I often install other software not listed here, but is handled in a case-by-case basis.

Install from App Store