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
"dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause" XF86AudioPlay | |
"dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Stop" XF86AudioStop | |
"dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next" XF86AudioNext | |
"dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous" XF86AudioPrevious |
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/env python | |
# coding: utf-8 | |
"""This script reads all .java files from a directory tree and removes unused | |
import statements. It may have errors in detecting import lines (e.g. import | |
lines within block comments, or import lines with another statement in the same | |
line), and it may have false-negatives when deciding to remove an import (i.e. | |
it only removes if the last import symbol word doesn't appear at all - | |
including comments - in the code). |
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
<?php | |
/* | |
* Plugin Name: Oh noes, not another SEO plugin! | |
* License: GPLv3 http://www.gnu.org/copyleft/gpl.html | |
*/ | |
add_filter( 'wp_title', function( $title ) { | |
if ( is_singular() ) $title .= ' — ' . get_bloginfo( 'name' ); | |
if ( is_archive() ) $title = sprintf( ' Archives: %s — %s', $title, get_bloginfo( 'name' ) ); | |
if ( is_home() ) $title = sprintf( '%s — %s', get_bloginfo( 'name' ), get_bloginfo( 'description' ) ); | |
if ( is_search() ) $title = sprintf( 'Searching for: %s — %s', get_search_query( true ), get_bloginfo( 'description' ) ); |
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
<?php | |
/** | |
* Image shortcode callback | |
* | |
* Enables the [kovshenin_image] shortcode, pseudo-TimThumb but creates resized and cropped image files | |
* from existing media library entries. Usage: | |
* [kovshenin_image src="http://example.org/wp-content/uploads/2012/03/image.png" width="100" height="100"] | |
* | |
* @uses image_make_intermediate_size | |
*/ |