Skip to content

Instantly share code, notes, and snippets.

@darekkay
darekkay / trakt-backup.php
Last active July 19, 2025 17:55
Trakt.tv backup script
<?php
/*
Backup script for trakt.tv (API v2).
Live demo: https://darekkay.com/blog/trakt-tv-backup/
*/
// create a Trakt app to get a client API key: http://docs.trakt.apiary.io/#introduction/create-an-app
$apikey = "CLIENT_API_KEY";
@CBeloch
CBeloch / .htaccess
Last active November 6, 2020 11:25
Giphy - Random GIF by Tag
# Will allow to use a .gif extension.
# Script can now be used as www.mydomain.com/pokemon.gif
RewriteEngine on
RewriteRule ^(.*).gif giphy.php?tag=$1 [L,QSA]
@jmark
jmark / reconnectFritzBox7360SL.sh
Last active February 26, 2016 18:41
Bash script: Force reconnect for router Fritz!Box 7360 SL (FRITZ!OS: 06.20)
#!/bin/bash
# date: 2015-01-24
# Inspiration from: http://www.gtkdb.de/index_7_1302.html
payload=$(cat <<EOF
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope
s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
using terms from application "Mail"
on perform mail action with messages theMessages for rule theRule
tell application "Mail"
repeat with eachMessage in theMessages
try
say content of eachMessage as string
end try
end repeat
end tell
end perform mail action with messages
@r15ch13
r15ch13 / convert-aax-to-m4a.cmd
Last active December 18, 2023 18:45
Convert aax to m4a
@echo off
setlocal enableextensions
chcp 65001
set input=%1
set device=%2
set loglevel=quiet
for %%i in ("%~f1") do set dirname=%%~dpi
for %%i in ("%~f1") do set extension=%%~xi
set tempfile=%dirname%%RANDOM%-temp.m4a
@umidjons
umidjons / youtube-dl-download-audio-only-on-best-quality.md
Last active July 23, 2025 11:47
Download Audio from YouTube with youtube-dl

Download Audio from YouTube

-i - ignore errors

-c - continue

-t - use video title as file name

--extract-audio - extract audio track

@HusseinElMotayam
HusseinElMotayam / random-wallpaper.sh
Last active January 26, 2024 19:50
Bash script to fetch random wallpapers from Unsplash and set it on Ubuntu.
#!/bin/bash
wget -O /tmp/wallpaper.jpg https://source.unsplash.com/3840x2160/?wallpapers
gsettings set org.gnome.desktop.background picture-uri file:///tmp/wallpaper.jpg
gsettings set org.gnome.desktop.screensaver picture-uri file:///tmp/wallpaper.jpg
# Don't forget to make it executable via: chmod +x random-wallpaper.sh
# To schedule every 10 minutes:
# Run: crontab -e
@missmatsuko
missmatsuko / user.css
Last active October 29, 2020 13:23
Custom browser content stylesheet
/* Hide Google smartlock login popup */
iframe[src^="https://smartlock.google.com/"] {
display: none !important;
}
/* Brighter Netflix and YouTube videos */
video[src^="blob:https://www.netflix.com/"],
video[src^="blob:https://www.youtube.com/"] {
filter: brightness(1.4);
}