Skip to content

Instantly share code, notes, and snippets.

View tibor's full-sized avatar
🇪🇺

Tibor Martini tibor

🇪🇺
View GitHub Profile
@subfuzion
subfuzion / curl.md
Last active May 9, 2024 12:12
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@chuckreynolds
chuckreynolds / wordpress-publish-facebook-recrawl.php
Created November 11, 2015 10:34
Ping Facebook Graph to crawl (scrape) or rescrape the URL if a scheduled post goes live or a draft is published. Depending on this specific need I may just do it on any time status goes to publish regardless of the old status.
<?php
/**
* If post goes from "future" (scheduled) or "draft" to "publish" then alert facebook to (re)crawl it.
* @see https://codex.wordpress.org/Post_Status_Transitions#transition_post_status_Hook
*/
function chuck_notify_facebook_scraper( $new_status, $old_status, $post ) {
if ( $new_status != 'publish' ) {
return;
}
.disable-hover,
.disable-hover * {
pointer-events: none !important;
}
// XPath CheatSheet
// To test XPath in your Chrome Debugger: $x('/html/body')
// http://www.jittuu.com/2012/2/14/Testing-XPath-In-Chrome/
// 0. XPath Examples.
// More: http://xpath.alephzarro.com/content/cheatsheet.html
'//hr[@class="edge" and position()=1]' // every first hr of 'edge' class