Skip to content

Instantly share code, notes, and snippets.

View Skylinar's full-sized avatar
Writing Coffee & Drinking Code

Gino Skylinar

Writing Coffee & Drinking Code
  • Germany
View GitHub Profile
@clintkev251
clintkev251 / backup
Created July 28, 2022 00:01
Simple backup user script for unraid + rclone
#!/bin/bash
echo "Starting backup of appdata"
rclone sync /mnt/user/Docker\ Backup backblaze:some-bucket/Docker\ Backup --transfers 1 --bwlimit 75M
echo "Starting backup of Shared Documentation"
rclone sync /mnt/user/Shared\ Documentation backblaze:some-bucket/Shared\ Documentation --bwlimit 75M
echo "Starting backup of Read Media"
rclone sync /mnt/user/Read_Media/Music backblaze:some-bucket/Read_Media/Music --bwlimit 75M
echo "Starting backup of Pictures"
rclone sync /mnt/user/Pictures backblaze:some-bucket/Pictures --bwlimit 75M
echo "Starting backup of Workdata"
@mattstibbs
mattstibbs / Duplicacy pre-backup script
Last active December 29, 2022 20:48
A pre-backup script for using with Duplicacy backups
#!/bin/bash
# Gather current power status
AC_POWER=`ioreg -l | grep ExternalConnected | cut -d"=" -f2 | sed -e 's/ //g'`
# Gather details about current wifi network
WIFI_NETWORK=`networksetup -getairportnetwork en0 | grep 'Current Wi-Fi Network' | cut -c 24-`
# Specify the name of your home / office wifi network here
HOME_WIFI=my_home_wifi
@slykar
slykar / dell-idrac6-ipmitool-fan-controll.md
Last active July 14, 2024 10:12
Fan control IPMI commands for Dell T610

Dell Fan Control Commands

print temps and fans rpms

ipmitool -I lanplus -H <iDRAC-IP> -U <iDRAC-USER> -P <iDRAC-PASSWORD> sensor reading "Ambient Temp" "FAN 1 RPM" "FAN 2 RPM" "FAN 3 RPM"

print fan info

Disable Device Enrollment Notification on Mac.md

Restart the Mac in Recovery Mode by holding Comment-R during restart

Open Terminal in the recovery screen and type

csrutil disable
@sjwilliams
sjwilliams / uap-reboot.sh
Created September 26, 2016 00:28 — forked from stevejenkins/uap-reboot.sh
Simple shell script to remotely reboot a Ubiquiti UBNT UniFi Access Point (UAP, UAP-PRO, UAP-AC, etc.)
#!/bin/sh
# A simple script for remotely rebooting a Ubiquiti UniFi access point
# Version 1.0 (Dec 15, 2015)
# by Steve Jenkins (http://www.stevejenkins.com/)
# Requires sshpass (https://sourceforge.net/projects/sshpass/) which
# is probably available via dnf, yum, or apt on your *nix distro.
# USAGE

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by
@tswaters
tswaters / stubbing-classes.md
Last active June 18, 2024 12:47
stubbing classes?

Stubbing Classes and their Constructors in Native ES6

It's getting to that point. All the major evergreen browsers have (mostly) functional class keyword. But what does this mean for unit tests and the ability to stub constructors? In short, the answer is 'no'.

Many will tell you that es6 classes are just sugar coated es5 functions with prototypal inheritance setup. Mostly true - but there are two considerations that make testing more difficult:

  • super is a magical keyword that calls the same method on the parent class. in cases with methods, easy enough to stub those, sinon.stub(parent.prototype, 'whatever') -- for super itself, there is no way to stub out the constructor call... normally not a huge deal, but...

  • classes are not added to the global scope. where once you could call sinon.stub(global, 'SomeFunction'), sinon.stub(global, 'SomeClass') (or under window in the browser), this will throw an error.

@kevin-smets
kevin-smets / iterm2-solarized.md
Last active July 22, 2024 18:26
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k