Skip to content

Instantly share code, notes, and snippets.

Melvin Tercan melvinmt

Block or report user

Report or block melvinmt

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View highest_prime.py
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:
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.
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; }
@melvinmt
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 gist.io, 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

@melvinmt
melvinmt / HttpClient.php
Created Nov 4, 2011
Tinypay POST method fix
View HttpClient.php
<?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
View gist:849490
<?php
require_once('phpFlickr.php');
$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];
View gist:849485
<?php
require_once('phpFlickr.php');
$f = new phpFlickr($flickr_api_key, $flickr_api_secret);
$request = $f->people_getPhotos($user_id);
foreach ($request['photos']['photo'] as $photo){
View gist:849482
<?php
require_once('phpFlickr.php');
$f = new phpFlickr($flickr_api_key, $flickr_api_secret);
$f->auth("read");
?>
View gist:849469
<?php
require_once('Tinypayme.php');
$t = new Tinypayme($mashape_api_key);
$request = $t->createItem(
$access_token = $access_token,
$title =stripslashes($data['title']),
$currency = $data['currency'],
View gist:849462
<?php
// construct upload url
$upload_url = 'https://tinypay.me/mashape';
$ch = curl_init();
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_VERBOSE, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
You can’t perform that action at this time.