This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# NAME: suspendtime | |
# PATH: $HOME/askubuntu/ | |
# DESC: For: https://askubuntu.com/questions/321855/how-to-get-real-uptime | |
# DATE: November 6, 2019. | |
# NOTE: Calculate suspend time from systemd's journalctl | |
# UPDT: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for DIR in */; do | |
if [ -f "$DIR" ] | |
then | |
continue | |
fi | |
BASENAME=`basename "$DIR"` | |
echo "$DIR" | |
mkdir -p "$DIR/pdf" | |
MAX=0 | |
for a in `seq 1 500`; do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
TOTALGB=`echo "scale=2; $(sudo /usr/sbin/smartctl -A /dev/sda | grep "Total_LBAs_Written" | awk '{print $10}') * 512 / 1073741824" | bc` | |
echo "$TOTALGB GB written" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function getUser(): User | |
{ | |
//... | |
} | |
$a = getUser(); | |
$a-> // PRESS CTRL-SPACE TO AUTO COMPLETE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- TLP 0.9 -------------------------------------------- | |
+++ Configured Settings: /etc/default/tlp | |
TLP_ENABLE=1 | |
TLP_DEFAULT_MODE=AC | |
DISK_IDLE_SECS_ON_AC=0 | |
DISK_IDLE_SECS_ON_BAT=2 | |
MAX_LOST_WORK_SECS_ON_AC=15 | |
MAX_LOST_WORK_SECS_ON_BAT=60 | |
CPU_SCALING_GOVERNOR_ON_AC=powersave |