Skip to content

Instantly share code, notes, and snippets.

View jongamble's full-sized avatar

Jon Gamble jongamble

View GitHub Profile
@jonesch
jonesch / gist:4072127
Created November 14, 2012 13:42
Downloading Flickr photos
<?php // Let's go get some flickr photos. Key and Set are defined in the uploader.
$query = 'http://api.flickr.com/services/rest/?&method=flickr.photosets.getPhotos&api_key='.$apiKey.'&photoset_id='.$photoset_id.'&extras=url_o,url_c&format=php_serial';
$ch = curl_init(); // open curl session
// set curl options
curl_setopt($ch, CURLOPT_URL, $query);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$data = curl_exec($ch); // execute curl session
@jonesch
jonesch / gist:5153018
Created March 13, 2013 15:07
Here is a SASS file that will help with theming your Wordpress Login page.
@import "compass";
body.login {
// background: transparent url(../img/bg-footer.png) 0 0 repeat;
h1 {
text-align: center;
a {
width: 320px;
height: 92px;
// background: url(../img/logo-login.png) 0 0 no-repeat;
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active July 7, 2024 19:32
A badass list of frontend development resources I collected over time.
@jonesch
jonesch / global-sprite
Created October 8, 2013 19:32
Simple Mixin for Global Sprite
// Setup
@mixin global-sprite($x-value, $y-value){
background: transparent url(../img/sprite-global-assets.png) $x-value $y-value no-repeat;
}
// Usage
@include global-sprite(0, -40px);
@jonesch
jonesch / mail-chimp-subscribe
Last active December 29, 2015 10:39
AJAX PHP Processor - Mail Chimp List Subscribe v2.0
//create a clean array of data to be posted
foreach($_POST as $key => $val) {
$user_input[$key] = htmlentities(stripslashes(trim($val)), ENT_QUOTES, 'UTF-8');
}
// There are two unique parts to this URL. The First is the "us3" portion of the URL is specific to your account. The second is the file extension at the end is what is returned, you can set it to json, php, or xml, but json is default.
$post_url = 'https://us3.api.mailchimp.com/2.0/lists/subscribe.json?';
// Let's put together our user data to send
$post_query_array = array(