Skip to content

Instantly share code, notes, and snippets.

<?php
//put in your nation slug and token
$url ="https://<your slug>.nationbuilder.com/api/v1/people?access_token=<token>";
$data = array(
'person' => array(
'email' => "example@foo.com",
'last_name' => "Bob",
'first_name' => "Smith",
@srobbin
srobbin / gist:6893837
Created October 8, 2013 23:52
A quick workaround for Backstretch on iOS7
if (navigator.userAgent.match(/(iPad|iPhone);.*CPU.*OS 7_\d/i)) {
$("body").css({
"background": "url(path/to/image.jpg) center center no-repeat",
"background-size": "cover"
});
} else {
$.backstretch("path/to/image.jpg");
}
@jeremy2
jeremy2 / gist:2479338
Created April 24, 2012 12:44
HTML input fields used for Zip Codes should be type=text and use the pattern attribute to provide hints to the browser
<!--
-
- US Zip Codes are text (not numbers) made up of digits (and optionally the dash character, if you accept 9 digit codes)
-
- Number input fields will drop leading zeros and may add numeric formatting (ie- add commas) to the input. This behavior
- is incorrect for Zip Codes which can have leading zeros and should not include commas.
-
- This Gist shows the incorrect and correct way to tell the browser what is expected in a Zip Code field. Oddly, HTML5
- adds 'date', 'time' and 'tel' types to input elements, but does not include 'zip'.
-
@Integralist
Integralist / remote-git.md
Created February 21, 2012 09:51
Basic set-up of remote git repository on a standard server

Set-up remote git repository on a standard server

The first thing to do is to install Git on the remote server.

Once you do that the rest of the process is split into three sections:

  1. Server set-up
  2. Local set-up (push commits)
  3. Server (pull commits)
@smajda
smajda / aggregate-feed.php
Created October 7, 2009 16:41
Merge multiple RSS feeds with SimplePie
<?php
/* Merge multiple RSS feeds with SimplePie
*
* Just modify the path to SimplePie and
* modify the $feeds array with the feeds you want
*
* You should probably also change the channel title, link and description,
* plus I added a CC license you may not want
*
* Help from: http://www.webmaster-source.com/2007/08/06/merging-rss-feeds-with-simplepie/