Skip to content

Instantly share code, notes, and snippets.

Mark Lewis ThuggishNuggets

  • Austin, TX
Block or report user

Report or block ThuggishNuggets

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
ThuggishNuggets /
Created May 3, 2019
GPD Pocket Linux Charge Status
voltage() { cat /sys/class/power_supply/fusb302-typec-source/voltage_now; }
voltage_actual() { cat /sys/class/power_supply/max170xx_battery/voltage_now; }
current_actual() { cat /sys/class/power_supply/max170xx_battery/current_now; }
current() { cat /sys/class/power_supply/fusb302-typec-source/current_max; }
current_limit() { cat /sys/class/power_supply/bq24190-charger/input_current_limit; }
capacity() { cat /sys/class/power_supply/max170xx_battery/capacity; }
echo "Voltage: $(expr `voltage` / 1000000)V DC"
echo "Voltage (actual): $(echo 'scale=2; '$(voltage_actual)'/1000000' | bc)V DC"
ThuggishNuggets / instructions.markdown
Last active Sep 29, 2017
A post-checkout/post-merge hook for running pod install if necessary after checking out a branch or merging changes
View instructions.markdown

pod install, post-checkout & post-merge

Keep your installed pods up-to-date between branch checkouts! This is a git post-checkout hook for running a pod install if necessary when a checkout event happens in your local working git repository.

Install with

curl > .git/hooks/post-checkout
chmod +x .git/hooks/post-checkout

curl > .git/hooks/post-merge
ThuggishNuggets / Zephyr.swift
Created Jun 7, 2017
Variadic Function Overload Workaround
View Zephyr.swift
// ... more code ...
public static func sync(keys: String...) {
sync(keys: keys)
public static func sync(keys: [String]) {
switch sharedInstance.dataStoreWithLatestData() {
You can’t perform that action at this time.