Skip to content

Instantly share code, notes, and snippets.

Avatar
🦅
Doing work

Cassie Levett clevett

🦅
Doing work
View GitHub Profile
@larshaendler
larshaendler / rename_multiple_files.md
Created Jan 21, 2019
Rename multiple files with prefix or suffix in Linux console
View rename_multiple_files.md

Add a suffix

for file in *; do mv "$file" "$(basename "$file")yourSuffix"; done;

Exmpale to add an underscore "_" at the end each text file:

for file in *.txt; do mv "$file" "$(basename "$file")_"; done;

Add a prefix

@clevett
clevett / Sysinfo.sh
Created Apr 29, 2016 — forked from jgamblin/Sysinfo.sh
A Bash Script To Get System Information For OSX.
View Sysinfo.sh
#!/bin/bash
# You Will need to install istats
# gem install istats
echo && echo ———————-System Information:——————— &&
/bin/echo -n "Uptime: " && uptime | awk '{print $3}'
echo
/bin/echo -n "CPU Usage: " && top -l 1 | awk '/CPU usage/ {print $3}'
/bin/echo -n "CPU Temp: " && istats | grep CPU\ temp | awk '{print $3}'
/bin/echo -n "FAN Speed: " && istats | grep Fan\ 0\ speed: | awk '{print $4,$5}'
@jgamblin
jgamblin / Sysinfo.sh
Last active Mar 22, 2022
A Bash Script To Get System Information For OSX.
View Sysinfo.sh
#!/bin/bash
# You Will need to install iStats
# gem install istats
echo && echo ———————-System Information:——————— &&
/bin/echo -n "Uptime: " && uptime | awk '{print $3}'
echo
/bin/echo -n "CPU Usage: " && top -l 1 | awk '/CPU usage/ {print $3}'
/bin/echo -n "CPU Temp: " && istats | grep CPU\ temp | awk '{print $3}'
/bin/echo -n "FAN Speed: " && istats | grep Fan\ 0\ speed: | awk '{print $4,$5}'
View Shadow Run 5th Edition Initiative Script
var iniobj = {
to: [],
check: '',
idx: 0
};
var inicheck = function() {
iniobj.po = iniobj.to;
iniobj.to = JSON.parse(Campaign().get('turnorder'));
iniobj.check = _.find(iniobj.to, function(obj) { return obj.custom == 'Initiative Pass'});