Skip to content

Instantly share code, notes, and snippets.

@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);
}
@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
@umidjons
umidjons / youtube-dl-download-audio-only-on-best-quality.md
Last active March 9, 2024 07:54
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

@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
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
@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/">
@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]
@darekkay
darekkay / trakt-backup.php
Last active June 18, 2024 14:28
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";
@empiricalthought
empiricalthought / CheckGitHubPR.scpt
Created December 14, 2013 21:48
This Applescript can be applied as a rule to incoming GitHub pull request notification e-mails. It will create a reminder in the OS X "Reminders" app if the assignee matches the account on the incoming mail.
using terms from application "Mail"
on perform mail action with messages theMessages for rule theRule
set credentials to do shell script "security find-internet-password -g -s github.com 2>&1 | awk '
/^password:/ {
sub(\".*password: \\\"\", \"\")
sub(\"\\\".*\", \"\")
password = $0
}
/acct/ {
@pheraph
pheraph / backup-uberspace.sh
Last active January 24, 2017 19:21
Eine lokale Sicherung eines oder aller uberspace(s) erstellen
#!/bin/sh
#
# Erstellt eine lokale Sicherung von /home/username, /var/www/virtual/username und der Datenbanken des Benutzers
#
# Voraussetzungen:
# Auf dem lokalen Computer sind die uberspaces in ~/.ssh/config wie folgt konfiguriert:
# Host uberspacename
# HostName sternenkonstellation.uberspace.de
# User uberspacename
#