Skip to content

Instantly share code, notes, and snippets.

View cristianstan's full-sized avatar
🎯
Focusing

Cristian Stan cristianstan

🎯
Focusing
View GitHub Profile
@cristianstan
cristianstan / wpinstall
Created May 17, 2016 14:18 — forked from j0lvera/wpinstall
Install WordPRess
#!/bin/bash -e
# Install WordPress and clean the folder
echo "======================"
echo " Installing WordPress "
echo "======================"
echo ""
# Download the files (cURL works fine here too)
wget http://wordpress.org/latest.tar.gz
<?php
/**
* Wrapper class for the Envato marketplaces API.
*
* @author Jeffrey Way <[email protected]>
* @created January, 2012
* @license Do-whateva-ya-want-with-it
*/
@cristianstan
cristianstan / envato-class.php
Created May 12, 2016 14:50 — forked from Zenger/envato-class.php
Confirm user license key on envato marketplaces
<?php
class Envato
{
protected static $key = "";
protected static $username = "";
public static function verify( $code )
@cristianstan
cristianstan / jquery-method.js
Created May 12, 2016 14:48 — forked from JeffreyWay/jquery-method.js
Envato Marketplace API - Get Popular Items and Authors
$.getJSON('http://173.255.193.46/api/edge/popular:themeforest.json?callback=?', function(files) {
var imgs;
files = files.popular;
console.log(files); // see what's available to play with
imgs = $.map(files.items_last_week, function(file, i) {
return '<a href="' + file.url + '"><img src=' + file.thumbnail + '></a>';
});
@cristianstan
cristianstan / envato.lib.php
Created May 12, 2016 14:42 — forked from dtbaker/envato.lib.php
Envato PHP library by @sowailem
<?php
/**
* @file
* Integration layer to communicate with the Envato API.
*
* @see https://build.envato.com/api
*
* @outher Abdullah Sowailem.
*/
@cristianstan
cristianstan / class.envato-api-basic.php
Created May 12, 2016 14:39 — forked from dtbaker/class.envato-api-basic.php
Simple PHP class for interacting with the Envato API within a WordPress plugin
<?php
/**
* Exception handling class.
*/
class EnvatoException extends Exception {
}
@cristianstan
cristianstan / class.envato2.php
Created May 12, 2016 14:38 — forked from dtbaker/class.envato2.php
Using the verify-purchase endpoint of the new Envato API to validate a purchase code.
<?php
// NOTE: verify-purchase has been deprecated and it's best to use the new /author/sale endpoint as documented on http://build.envato.com/
// created by Envato user wpdreams https://forums.envato.com/t/verify-purchase-class/3526
// usage example:
$o = EnvatoApi2::verifyPurchase( $purchase_code );
@cristianstan
cristianstan / 0_reuse_code.js
Last active August 29, 2015 14:17
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console