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:
I hereby claim:
To claim this, I am signing this object:
Login to your Linode
ssh root@198.51.100.0
Set hostname
echo "foobar" > /etc/hostname
hostname -F /etc/hostname
Verifying that +sandeepshetty is my openname (Bitcoin username). https://onename.com/sandeepshetty |
javascript:(function(){var l='http://www.tumblr.com/share?v=3&u='+encodeURIComponent(location.href)+'&t='+document.title;w=open(l,'w','location=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=500,height=400,modal=yes,dependent=yes');if(w){setTimeout('w.focus()',1000)}else{location=l}})(); |
<?php | |
$fruits = array('apples', 'oranges'); | |
$more_fruits = array('bananas', 'mangoes'); | |
$all_fruits = array_merge($fruits, $more_fruits); | |
print_r($all_fruits); | |
?> |
Array | |
( | |
[0] => apples | |
[1] => oranges | |
[2] => bananas | |
[3] => mangoes | |
) |
Array | |
( | |
[per_page] => 50 | |
[format] => json | |
[page] => 3 | |
) |
<?php | |
$default_settings = array('page'=>3, 'per_page'=>100); | |
$user_override = array('per_page'=>50, 'format'=>'json'); | |
$overriden_setting = $user_override + $default_settings; | |
print_r($overriden_setting); | |
?> |
<?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'); |
<?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); | |
} | |
?> |