Skip to content

Instantly share code, notes, and snippets.

@luckycdev
luckycdev / bookmarklet-return-youtube-dislikes.js
Last active July 15, 2022 19:35
show youtube dislikes with a bookmarklet / youtube dislikes bookmarklet
javascript:var a="https://returnyoutubedislikeapi.com/votes?videoId=";var b=location.search.split("v=")[1].split("&")[0];if(location.hostname==="www.youtube.com"){open(a+b);}else if(location.hostname==="youtu.be"){open(a+b);}else if(location.hostname==="www.youtube-nocookie.com"){open(a+b);}
#!/bin/bash
# Script to Auto Update Plex on Synology NAS
#
# Must be run as root.
#
# @author Martino https://forums.plex.tv/u/Martino
# @see https://forums.plex.tv/t/script-to-auto-update-plex-on-synology-nas-rev4/479748
mkdir -p /tmp/plex/
sudo su
apt-get install -y autoconf automake libtool nasm make pkg-config
cd /tmp
wget https://github.com/mozilla/mozjpeg/releases/download/v3.1/mozjpeg-3.1-release-source.tar.gz
tar -xvf mozjpeg-3.1-release-source.tar.gz
cd mozjpeg
autoreconf -fiv
mkdir build && cd build
sh ../configure
make install
@steinwaywhw
steinwaywhw / One Liner to Download the Latest Release from Github Repo.md
Last active April 18, 2025 13:48
One Liner to Download the Latest Release from Github Repo
  • Use curl to get the JSON response for the latest release
  • Use grep to find the line containing file URL
  • Use cut and tr to extract the URL
  • Use wget to download it
curl -s https://api.github.com/repos/jgm/pandoc/releases/latest \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \
## How to hide API keys from github ##
1. If you have already pushed commits with sensitive data, follow this guide to remove the sensitive info while
retaining your commits: https://help.github.com/articles/remove-sensitive-data/
2. In the terminal, create a config.js file and open it up:
touch config.js
atom config.js
# Defaults / Configuration options for homebridge
# The following settings tells homebridge where to find the config.json file and where to persist the data (i.e. pairing and others)
HOMEBRIDGE_OPTS=-U /var/lib/homebridge
# If you uncomment the following line, homebridge will log more
# You can display this via systemd's journalctl: journalctl -f -u homebridge
# DEBUG=*
@nl5887
nl5887 / transfer.fish
Last active July 30, 2024 09:21
Bash and zsh alias for transfer.sh. Transfers files and directories to transfer.sh.
function transfer
if test (count $argv) -eq 0
echo "No arguments specified. Usage:\necho transfer /tmp/test.md\ncat /tmp/test.md | transfer test.md"
return 1
end
## get temporarily filename, output is written to this file show progress can be showed
set tmpfile ( mktemp -t transferXXX )
## upload stdin or file
@tessi
tessi / installation.md
Last active July 30, 2020 11:52
Install OpenProject on uberspace.de

How to install OpenProject on uberspace.de

Follow those steps to install OpenProject on a fresh uberspace.

Step 1: Install dependencies

First we set-up all dependencies. We use ruby 2.1.2 and install gems in a user directory:

echo "gem: --user-install --no-rdoc --no-ri" > ~/.gemrc

cat <<'EOF' >> ~/.bash_profile

@styxit
styxit / synology-pushover.php
Last active February 5, 2020 11:31
A php script that can be used on a Synology Nas to revive Pushover notifications. https://styxit.com/2014/05/10/synology-pushover.html
<?php
/************************************/
/********** CONFING START ***********/
// Only allow request made by localhost?
// Set this to false if this script is not running on your synology webserver (less secure)
$localOnly = true;
/********** CONFING END *************/
/************************************/
@philgruneich
philgruneich / Toggle Invisible Files.scpt
Created March 16, 2014 05:06
Show/Hide invisible files in Finder. Add to ~/Library/Application Support/Launchbar/Scripts to launch from Launchbar.
set stateMent to do shell script "defaults read com.apple.finder AppleShowAllFiles"
if stateMent = "TRUE" then
do shell script "defaults write com.apple.finder AppleShowAllFiles FALSE"
else
do shell script "defaults write com.apple.finder AppleShowAllFiles TRUE"
end if
tell application "Finder" to quit
delay 2
launch application "Finder"