Skip to content

Instantly share code, notes, and snippets.

@ryanhatfield
ryanhatfield / hide-slack-sidebar-icons
Last active October 4, 2023 06:13
Hide Slack Sidebar Icons
#! /usr/bin/env bash
##############
##
## A script to inject a custom style into Slack that hides the new sidebar icons.
## This script has very little error catching or extra debug output
##
## Run at your own risk.
## Anything done here can be "uninstalled" by reinstalling Slack
##
## To run Slack in debug mode, run the following:
@joshuat
joshuat / Slack avatar-less sidebar.md
Last active January 19, 2021 08:25
Remove the avatars from your slack sidebar

Slack has listened to feedback and given us a way to toggle off the sidebar avatars.

(This only seems to be available in the Beta channel at the moment)

Display or hide profile photos

  1. From your desktop, click your profile picture in the top right.
  2. Select Preferences from the menu.
  3. Click Sidebar in the left-side column.
  4. Check or uncheck the boxes next to Show profile photos next to DMs.
@catchdave
catchdave / replace_synology_ssl_certs.sh
Last active May 6, 2024 13:16
CLI script to programmatically replace SSL certs on Synology NAS
#!/bin/bash
#
# *** For DSM v7.x ***
#
# How to use this script:
# 1. Get your 3 PEM files ready to copy over from your local machine/update server (privkey.pem, fullchain.pem, cert.pem)
# and put into a directory (this will be $CERT_DIRECTORY).
# Personally, I use this script (https://gist.github.com/catchdave/3f6f412bbf0f0cec32469fb0c9747295) to automate steps 1 & 4.
# 2. Ensure you have a user setup on synology that has ssh access (and ssh access is setup).
# This user will need to be able to sudo as root (i.e. add this line to sudoers, <USER> is the user you create):
@smarek
smarek / README.md
Last active January 24, 2021 22:21
Inflate gzdeflate contents / decode eIDAS SAMLRequest param

Run like

> decode_saml_request.sh sample_data
@tehmoon
tehmoon / iptables-reload.sh
Last active January 13, 2024 09:21
IPtables and docker reload!
#!/bin/sh
set -e
## SEE https://medium.com/@ebuschini/iptables-and-docker-95e2496f0b45
## You need to add rules in DOCKER-BLOCK AND INPUT for traffic that does not go to a container.
## You only need to add one rule if the traffic goes to the container
CWD=$(cd "$(dirname "${0}")"; pwd -P)
FILE="${CWD}/$(basename "${0}")"
@hjbotha
hjbotha / free_ports.sh
Last active May 8, 2024 14:15
Free ports 80 and 443 on Synology NAS
#! /bin/bash
# NEWLY ADDED BACKUP FUNCTIONALITY IS NOT FULLY TESTED YET, USE WITH CARE, ESPECIALLY DELETION
# Developed for DSM 6 - 7.0.1. Not tested on other versions.
# Steps to install
# Save this script in one of your shares
# Edit it according to your requirements
# Backup /usr/syno/share/nginx/ as follows:
# # cd /usr/syno/share/
# # tar cvf ~/nginx.tar nginx

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
@tzmartin
tzmartin / m3u8-to-mp4.md
Last active May 8, 2024 18:52
m3u8 stream to mp4 using ffmpeg

1. Copy m3u8 link

Alt text

2. Run command

echo "Enter m3u8 link:";read link;echo "Enter output filename:";read filename;ffmpeg -i "$link" -bsf:a aac_adtstoasc -vcodec copy -c copy -crf 50 $filename.mp4
@ColinLeverger
ColinLeverger / update-images.sh
Created December 8, 2016 11:36
Update all Docker images
docker images | grep -v REPOSITORY | awk '{print $1}' | xargs -L1 docker pull