An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
// create a new store | |
var store = new Lawnchair({adaptor:'dom', table:'people'}); | |
// saving documents | |
store.save({name:'brian'}); | |
// optionally pass a key | |
store.save({key:'config', settings:{color:'blue'}}); | |
// updating a document in place is the same syntax |
<?php | |
/* | |
Template Name: Comment Graph | |
*/ | |
?> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset=utf-8> |
<?php | |
define('ALPHABET_SIZE',1); | |
function compute_prefix($str,$size,&$result=0) | |
{ | |
$result = $result[$size + 1]; | |
$q; | |
$k; | |
$result[0] = 0; |
An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
<?php | |
/** | |
* Retrieves the thumbnail URL to use for a post | |
* @param string $text The body of the post (get_content) | |
* @param string $size The image size to retrieve | |
* @return string The image URL to use | |
*/ | |
function rw_get_thumb_url($text, $size){ | |
global $post; |
This snippet filters oEmbed output in WordPress (the_content()
) to force responsive embeds.
To use, add the contents of responseive_embeds.less
to your site's stylesheet (if you're not using LESS, don't forget to move the iframe,object,embed
rule outside of .embed-container
and change it to .embed-container iframe,.embed-container object,.embed-container embed
).
Then add the responsive_embed()
function to your theme's functions.php
and insert the add_filter()
call in your theme's setup function.
<?php | |
/** | |
* NextValetDriver for running compiled next.js sites | |
*/ | |
class NextValetDriver extends BasicValetDriver | |
{ | |
/** | |
* Determine if the driver serves the request. | |
* |