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
#------------------------------------------------ | |
# Name : yt-streamer | |
# Input : youtube URL | |
# Purpose : stream url video from youtube to mpv. see: | |
# https://github.com/ytdl-org/yt-dlp/issues/2124#issuecomment-32429104 | |
# Dependencies : yt-dlp, mpv | |
#------------------------------------------------ | |
yt-streamer() { | |
# add help option == print and exit | |
if [[ "$1" == "-h" ]] || [[ -z "$1" ]] |
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 | |
check_backup_disk() { | |
local -a EXTERNAL_DISK_PATHS=( | |
"/dev/disk/by-id/usb-SOME_EXTERNAL_USB_XXXXXXXXXXXXXXX-0:0" | |
"/dev/disk/by-id/usb-SOME_External_USB_3.0_XXXXXXXXXXXXXX-0:0" | |
) | |
CURRENT_DISK="" | |
for path in "${EXTERNAL_DISK_PATHS[@]}"; do | |
if [[ -e "$path" ]]; then |
Warning This is SEVERELY outdated, the current jupyter version is > 6.X, please refer to your current jupyter notebook installation!
Disclaimer : I just copied those shortcuts from Jupyter Menú
> Help
> Keyboard Shortcuts
, I didn't wrote them myself.
Check your current shortcuts in your Help, shortcuts coule have been modified by extensions or your past self.
Title: PostGIS 2.0 Cheatsheet CSS : css/cheaters.css
Permalink to PostGIS 2.0 Cheatsheet
PostgreSQL PostGIS Geometry/Geography/Box Types |
---|
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
#!/usr/bin/env python3 | |
import subprocess | |
import re | |
PACMAN_KERNEL_VERSION = subprocess.getoutput("pacman -Qi linux | sed -n -e '/Version/p'").split(':')[1].strip().split('.') | |
RUNNING_KERNEL_VERSION = subprocess.getoutput("uname -a") .split(' ')[2].strip().split('.') | |
if len(RUNNING_KERNEL_VERSION) != 4: | |
tmp=re.split(r'-', RUNNING_KERNEL_VERSION[-1],1) | |
RUNNING_KERNEL_VERSION[-1] = tmp[0] |
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
git_prompt () | |
{ | |
# see [Setting color on git status in bash prompt - Stack Overflow](http://stackoverflow.com/questions/24837340/setting-color-on-git-status-in-bash-prompt) | |
if [ $(git rev-parse --is-inside-work-tree &>/dev/null; printf "%s" $?) == 0 ] | |
then | |
local GIT_PROMPT="${RESET}(${DIM}g${RESET}|" | |
git_branch () { git branch 2>/dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'; } | |
# assemblate status statistic,substitute ? with U | |
git_status () { git status --porcelain 2>/dev/null | cut -c 1-2 | sort | uniq -c | sed 's/ *//;s/ */:/;s/\?/U/g' | paste -sd "|" -; } |
Title: PostgreSQL 9.0 Cheat Sheet CSS : css/cheaters.css
Permalink to PostgreSQL 9.0 Cheat Sheet
HTML to Markdowd by fuckyeahmarkdown
We cover only a subset of what we feel are the most useful constructs that we could squash in a single cheatsheet page commonly used
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
# from : 10 terminal commands to speed up your Mac | defaults-write.com | |
# https://www.defaults-write.com/10-terminal-commands-to-speed-up-macos-sierra-on-your-mac/ | |
#1. Disable animations when opening and closing windows. | |
defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false | |
#2. Disable animations when opening a Quick Look window. | |
defaults write -g QLPanelAnimationDuration -float 0 | |
#3. Accelerated playback when adjusting the window size (Cocoa applications). | |
defaults write NSGlobalDomain NSWindowResizeTime -float 0.001 | |
#4. Disable animation when opening the Info window in Finder (cmd⌘ + i). | |
defaults write com.apple.finder DisableAllAnimations -bool true |
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 | |
# unraid_array_fan.sh v0.5 | |
# v0.1: By xamindar: First try at it. | |
# v0.2: Made a small change so the fan speed on low doesn't fluctuate every time the script is run. | |
# v0.3: It will now enable fan speed change before trying to change it. I missed | |
# it at first because pwmconfig was doing it for me while I was testing the fan. | |
# v0.4: Corrected temp reading to "Temperature_Celsius" as my new Seagate drive | |
# was returning two numbers with just "Temperature". | |
# v0.5: By Pauven: Added linear PWM logic to slowly ramp speed when fan is between HIGH and OFF. | |
# A simple script to check for the highest hard disk temperatures in an array |
NewerOlder