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
tell application "System Events" | |
set myFrontMost to name of first item of (processes whose frontmost is true) | |
end tell | |
property theURL : "" | |
if myFrontMost is "Google Chrome" then | |
tell application "Google Chrome" |
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 | |
function supergeil_wrap_first_img_with_div($content) { | |
$pattern = '/<img ([^>]+) \/>/'; | |
$replacement = '<div class="supergeil"><img $1 /></div>'; | |
return preg_replace( $pattern, $replacement, $content, 1 ); | |
} | |
add_filter( 'the_content', 'supergeil_wrap_first_img_with_div' ); | |
?> |
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
# SearchLink – Generate Markdown links from web searches without leaving your | |
# editor. | |
# | |
# All tribute to [@ttscoff](http://brettterpstra.com/projects/searchlink/) | |
# | |
# Script is modified to my needs. You may want to explore details (in German) | |
# [here](http://www.ienno.de/search-link-enno-style). | |
# | |
require 'json' |