Skip to content

Instantly share code, notes, and snippets.

battery charge threshold

macsmc-battery selects different values anyways but those seem close enough.

install

sudo cp battery-charge-threshold-start.service battery-charge-threshold.service /etc/systemd/system/

enable

sudo systemctl enable battery-charge-threshold-start.service
@sebastianwagner
sebastianwagner / time-resolved-fluorescence-well-measurements.R
Created June 24, 2021 20:44
tooling for Technical Analysis Equipment wellplate flourescence measurement xlsx sheet csv
# run with:
# R --no-save --no-restore --file=time-resolved-fluorescence-well-measurements.R
# Hombrechtikon tooling for Technical Analysis Equipment
library(ggplot2)
filename <- 'measurement.csv'
offset <- 56
stop <- FALSE
@sebastianwagner
sebastianwagner / nm-disconnect-docker.sh
Last active August 29, 2015 14:17
Network Manager disconnect script for docker devices
#!/bin/sh
##
# @see https://github.com/jpetazzo/pipework/issues/72#issuecomment-50045428
##
which nmcli
if [ $? -eq 0 ]; then
LANG=C nmcli --terse --fields device,state device status \
| egrep "^(docker|vboxnet).*\:connected" \
@sebastianwagner
sebastianwagner / .gitignore
Last active July 25, 2016 12:46
Magento Core through composer
/vendor/
/htdocs/
composer.lock
#!/bin/sh
ssh-keygen -i -m RFC4716 -f id_rsa.ppk.pub
#!/bin/sh
#
# @author Sebastian Wagner <2000sw@gmail.com>
#
# ----------------------------------------------------------------------------
# "THE BEER-WARE LICENSE" (Revision 42):
# <2000sw@gmail.com> wrote this file. As long as you retain this notice you
# can do whatever you want with this stuff. If we meet some day, and you think
# this stuff is worth it, you can buy me a beer, club-mate or pizza in return
# ----------------------------------------------------------------------------
#!/bin/sh
# splash.sh
HOST=$(/sbin/ip route | awk '/default/ { print $3 }')
#echo \
curl \
-d target_url=stern.de_2F \
-d password=Hotspot \
@sebastianwagner
sebastianwagner / firmware.HpLjP1005.fritzbox.sh
Created January 21, 2014 21:23
Firmware upload helper for HP printer via AppSocket/JetDirect aka raw-socket
#!/bin/sh
# sudo getweb P1005
nc -q 4 fritz.box 9100 < /lib/firmware/hp/sihpP1005.dl
@sebastianwagner
sebastianwagner / lotustime.php
Created October 11, 2013 08:02
Converts Timestamp from LotusNotes format into Unix one
<?php
const LOTUS_TIME_FORMAT = '%Y%m%dT%H%M%S,';
function lotusTime2UnixTime($srcValue){
//Example 20110413T084135,95+02
/* in PHP5.3
$time = new DateTime();
$time->createFromFormat('Ymd\THis,uO', $srcValue);
$dstValue = intval($time->format('U')); */
$t = strptime($srcValue, LOTUS_TIME_FORMAT);
@sebastianwagner
sebastianwagner / magento_adminpassword.sh
Created July 11, 2013 08:19
Create password hashes for magento using salt from stdin or terminal requires pwgen
#!/bin/sh
# magento_adminpassword.sh
#
# reads an password from stdin or terminal and creates hash with salt for magento
# USAGE
# echo hai | ./adminpassword.sh
# or
# ./adminpassword.sh