This file contains hidden or 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
| function feedFilter($query) { | |
| if ($query->is_feed) { | |
| add_filter('rss2_item', 'feedContentFilter'); | |
| } | |
| return $query; | |
| } | |
| add_filter('pre_get_posts','feedFilter'); | |
| function feedContentFilter($item) { | |
This file contains hidden or 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
| // iMacro CheatSheet - Command Reference | |
| // http://wiki.imacros.net/Command_Reference | |
| // iMacros supports 3 types of variables: | |
| // * The macro variables !VAR0 thru !VAR9. They can be used with the SET and ADD command inside a macro. | |
| // * Built-in variables. They contain certain values set by iMacros. | |
| // * User-defined variables. They are defined in-macro using the SET command. | |
This file contains hidden or 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
| SET @oldsite='http://oldsite.com'; | |
| SET @newsite='http://newsite.com'; | |
| UPDATE wp_options SET option_value = replace(option_value, @oldsite, @newsite) WHERE option_name = 'home' OR option_name = 'siteurl'; | |
| UPDATE wp_posts SET post_content = replace(post_content, @oldsite, @newsite); | |
| UPDATE wp_links SET link_url = replace(link_url, @oldsite, @newsite); | |
| UPDATE wp_postmeta SET meta_value = replace(meta_value, @oldsite, @newsite); | |
| /* only uncomment next line if you want all your current posts to post to RSS again as new */ | |
| #UPDATE wp_posts SET guid = replace(guid, @oldsite, @newsite); |
This file contains hidden or 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 unobfuscate spiegel plus | |
| // @namespace obfuscate | |
| // @include http://www.spiegel.de/* | |
| // @version 1 | |
| // @grant none | |
| // ==/UserScript== | |
| if(document.getElementsByClassName('obfuscated-content')[0] != undefined) { | |
| document.getElementsByClassName('obfuscated-content')[0].setAttribute("class", ""); | |
| var elems = document.getElementsByClassName('obfuscated'), t, or, c, i, cc; |
This file contains hidden or 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
| <!-- | |
| This is a simple vue single file component example of using a subscription with vue-apollo. | |
| This starts out as a query, and then if there are any changes to the underlying data, | |
| the subscription updates it. The subscription works by holding open a websocket connection | |
| to the GraphQL server. This was tested using Hasura.io and PostgreSQL, but should work with | |
| any GraphQL implementation that supports websocket subscriptions. In the example, the | |
| PostgreSQL table would be in a schema named "myschema" and a table named | |
| "mytable" and that table would have two columns, "id" and "name". | |
| --> |
This file contains hidden or 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 | |
| # tunejack.sh uses the TuneIn public API (at opml.radiotime.com) to search for | |
| # a radio station, print out its details and try to play it somehow. | |
| if [ "$#" -eq 0 ]; then | |
| echo "$0: search for a radio station using the TuneIn API" | |
| echo "Usage: $0 PATTERN" | |
| exit 1 | |
| fi |
OlderNewer