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/php | |
<?php | |
/** | |
* This script subscribes all global moderators to all forums. | |
* Put this in your phpBB3 directory and do "chmod 0700 auto_subscribe_moderators.php" | |
* You can use crontab to run this script so your moderators stay subscribed! | |
*/ | |
// Path to the phpBB3 Config Script | |
require dirname(__FILE__).'/config.php'; |
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
// ==UserScript== | |
// @name Direct Links in Google Search | |
// @namespace https://github.com/astanin | |
// @description Remove indirections from Google search results on all TLDs. | |
// @include https://www.google.tld/*output=search* | |
// @include http://www.google.tld/*output=search* | |
// @include https://www.google.tld/search* | |
// @include http://www.google.tld/search* | |
// @include https://www.google.tld/#* | |
// @include http://www.google.tld/#* |
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 | |
# Description: | |
# Script to query mpd's status and download a cover of the currently playing | |
# song on song-change and execute a user-defined command to show the cover. | |
# (e.g. with notify-send, by default with a image viewer for testing) | |
# Feel free to make your customizations here. | |
MPD_SERVER="--port 6600 --host localhost" # For default case. |
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/sh | |
# Usage: add-random [[NUMBER [FILTER]] | |
sels="${1:-10}" | |
filter="${2:-}" | |
mpc listall | grep "$filter" | shuf | head "-n" "$sels" | while read selected | |
do | |
echo "$selected" |
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 | |
DATE=`date +%Y%m%d-%H%M%S` | |
PROGNAME=$(basename $0) | |
APPEND=-$DATE.tar.gz | |
# Set the local backup directory, ensure that this directory exists | |
LOCALDIR=$HOME/backups/ | |
# Set the remote directory to backup |
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/sh | |
# tool for mpd that formats the output of mpc in a way I can remember it. | |
# If I like a song in my playlist dump its name and file location into $file_path | |
# | |
file_path="~/temp/good_songs" | |
echo "--------------------------------------------------------------------------------" >> $file_path # note this line is 80characters wide. | |
SONG_INFO=`mpc status -f "%artist% - %title% \n%file%" | head -1` | |
SONG_LOCATION=`mpc status -f "%artist% - %title% \n%file%" | head -2 | tail -n -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 | |
sink_name="bluez_sink.00_42_1B_AD_FA_CE" | |
if [ -z "$1" ]; then | |
dbus-monitor --system "path=/org/bluez/777/hci0/dev_00_42_1B_AD_FA_CE, interface=org.bluez.AudioSink, member=Connected" | while read line; do | |
echo $line | |
$0 1 | |
done | |
else |
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 | |
# requires mpc to get song info | |
# requires glyr https://github.com/sahib/glyr to retrieve metadata | |
# requires eyeD3 http://eyed3.nicfit.net/ to extract image from mp3 | |
# uses xseticon, wmctrl, and transset to make its little terminal window all pretty. Feel free to delete these lines. | |
snark=$(echo $WINDOWID) | |
xseticon -id $snark ~/.icons/Faenza-Like/iKamasutra.png |
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
# I usually add a similar block to the .bashrc | |
#################################### | |
##### My Stuff: Walid Shouman #### | |
#################################### | |
# disable freezing, follow https://unix.stackexchange.com/a/72092/310075 | |
stty -ixon | |
#~~~~~~~~~~~~~~~~~~~~~~~# |
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
// | |
// | |
/////////////////////////////////////////////////////////////////////// | |
// bitly_MakeShortLink() | |
// | |
// - Description: | |
// Use the bit.ly api to generate short URL | |
// | |
// - Usage: | |
// $ShortURL = bitly_MakeShortLink($url); |
OlderNewer