-
Login to your Linode
-
Set hostname
echo "foobar" > /etc/hostname hostname -F /etc/hostname
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
Verifying that +sandeepshetty is my openname (Bitcoin username). https://onename.com/sandeepshetty |
I hereby claim:
- I am sandeepshetty on github.
- I am sandeepshetty (https://keybase.io/sandeepshetty) on keybase.
- I have a public key whose fingerprint is D701 C601 7AEF D8D3 DC95 86CA D589 17A0 9C41 E035
To claim this, I am signing this object:
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
{ | |
"entries": [ | |
{ | |
"type": "post", | |
"id": "2013/07/06/4", | |
"content": "", | |
"published": "", | |
"updated": "", | |
"response_counts": { | |
"comments": 0, |
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 | |
// Namespace and predicate start with a letter or underscore, | |
// followed by any number of letters, numbers, or underscores. | |
// If value contains spaces, it needs to be wrapped in quotes. | |
// Literal quotes within quotes need to be escaped using a backslash (\) | |
$test_cases=' | |
#repost |
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 | |
/** | |
* WP1 | |
* To Dos | |
* | |
* * sending comments needs to add current author data along with the comment data and thus register authorA ? on B along with the comment ? | |
* * send comment to a post on B from a post on A | |
* * send comment to a post on B from a comment on a post on A | |
* * parse url in post / comment |
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 | |
// All requests/redirects from Shopify include a signature parameter that can be used to verify the origin of the request. | |
function is_valid_request($query_params, $shared_secret) | |
{ | |
$seconds_in_a_day = 24 * 60 * 60; | |
$older_than_a_day = $query_params['timestamp'] < (time() - $seconds_in_a_day); | |
if ($older_than_a_day) return false; | |
$signature = $query_params['signature']; | |
unset($query_params['signature']); |
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 shopify_oauth_is_valid_signature($shared_secret, $shop, $signature, $timestamp) | |
{ | |
// TODO: make sure the request isn't more than a day old to avoid replay attacks | |
return (md5("{$shared_secret}shop={$shop}timestamp={$timestamp}") === $signature); | |
} | |
?> |
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 shopify_oauth_authentication_url($shops_myshopify_domain, $api_key, $scope=array(), $redirect_uri='') | |
{ | |
$scope = empty($scope) ? '' : '&scope='.implode(',', $scope); | |
$redirect_uri = empty($redirect_uri) ? '' : '&redirect_uri='.urlencode($redirect_uri); | |
return "https://$shops_myshopify_domain/admin/oauth/authorize?client_id=$api_key$scope$redirect_uri"; | |
} | |
$auth_url = shopify_oauth_authentication_url('johns-group2130.myshopify.com', API_KEY, array('write_products'), 'http://localhost:8888/shopify/install.php'); |
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
Array | |
( | |
[per_page] => 50 | |
[format] => json | |
[page] => 3 | |
) |
NewerOlder