Skip to content

Instantly share code, notes, and snippets.


Melvin Tercan melvinmt

View GitHub Profile
View gist:849351
$t = new Tinypayme($mashape_api_key);
$code = $_GET['code'];
$request = $t->getOAuthAccessToken(YOUR_ACCESS_TOKEN, $code);
View gist:849455
// first, save medium image
$ch = curl_init($medium['source']);
$medium_local_path = UPLOAD_DIR.'/'.time().'_'.basename($medium['source']);
$parse = parse_url($medium_local_path);
$medium_local_path = $parse['path']; // clean up dirty query strings from file name
$fh = fopen($medium_local_path, "w");
View gist:849485
$f = new phpFlickr($flickr_api_key, $flickr_api_secret);
$request = $f->people_getPhotos($user_id);
foreach ($request['photos']['photo'] as $photo){
View gist:849490
$f = new phpFlickr($flickr_api_key, $flickr_api_secret);
$request = $f->photos_getSizes($photo['id']);
// assume that largest size comes last:
$large = $request[count($request)-1];
melvinmt / HttpClient.php
Created Nov 4, 2011
Tinypay POST method fix
View HttpClient.php
* Mashape PHP Client library.
* Copyright (C) 2011 Mashape, Inc.
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
melvinmt / gist:3140173
Created Jul 19, 2012 — forked from idan/gist:3135754
Re: A Sample Post
View gist:3140173

This is me quoting this.

Hello there! This is a sample post for, a super-lightweight writing soapbox for hackers.

Now look up. Further. Above the post title. See that grey text with the gist ID?

Now back to me. That grey text is a link! Open that sucker in a new tab to see the source for this post. Also, I'm on a horse.

This is a major heading

View ie8-grid-foundation-4.css
/* The Grid ---------------------- */
.lt-ie9 .row { width: 940px; max-width: 100%; min-width: 768px; margin: 0 auto; }
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; }
.lt-ie9 .row.large-collapse .column,
.lt-ie9 .row.large-collapse .columns { padding: 0; }
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; }
.lt-ie9 .row .row.large-collapse { margin: 0; }
.lt-ie9 .column, .columns { float: left; min-height: 1px; padding: 0 15px; position: relative; }
.lt-ie9 .column.large-centered, .columns.large-centered { float: none; margin: 0 auto; }
View learngo.go
// Single line comment
/* Multi-
line comment */
// A package clause starts every source file.
// Main is a special name declaring an executable rather than a library.
package main
// Import declaration declares library packages referenced in this file.
def is_prime(x):
if x < 2:
return False
if x == 2:
return True
if x % 2 == 0:
return False
i = 3
while i < x:
if x % i == 0:
You can’t perform that action at this time.