Skip to content

Instantly share code, notes, and snippets.

View melanieceraso's full-sized avatar

Melanie Ceraso melanieceraso

View GitHub Profile
purchase_order = {
'type': 'purchase_order' ,
'secure_hash': 'b31c890a5e57c07666bd0ba0f104634f4edb0fed46cf66a2d67396a398898af3',
'pr_data': {
"merchant_id": "9a8e58eae43d01fd162d3c879f264d4d",
"currency": "USD",
"amount_cents": 2714,
"shipping_cents": 123,
"tax_cents": 123,
"finalize_on_create": true,
@niksumeiko
niksumeiko / disable-html-form-input-autocomplete-autofill.md
Last active April 18, 2024 07:11
Disable HTML form input autocomplete and autofill

Disable HTML Form Input Autocomplete and Autofill

  1. Add autocomplete="off" onto <form> element;
  2. Add hidden <input> with autocomplete="false" as a first children element of the form.
<form autocomplete="off" method="post" action="">
    <input autocomplete="false" name="hidden" type="text" style="display:none;">
    ...
@jonraasch
jonraasch / input-placeholder.js
Created June 7, 2012 22:42
HTML5 placeholder fallback that handles passwords (jquery)
/* JS fallback for HTML5 placeholder
* requires jQuery and Modernizr (to detect support)
* by Jon Raasch - @jonraasch - http://jonraasch.com/
* modified script from Nico Hagenburger: http://bit.ly/LgrkT0
*/
if(!Modernizr.input.placeholder){
$('[placeholder]').focus(function() {
var input = $(this);
if (input.val() == input.attr('placeholder')) {
@oomlaut
oomlaut / parseQuerystring.jquery.js
Created July 23, 2011 15:14
Parse the querystring with jQuery, returning an object containing index/value pairs
jQuery.extend({
parseQuerystring: function(){
var nvpair = {};
var qs = window.location.search.replace('?', '');
var pairs = qs.split('&');
$.each(pairs, function(i, v){
var pair = v.split('=');
nvpair[pair[0]] = pair[1];
});
return nvpair;
@boazsender
boazsender / modified-x-axis-intervals-and-labels.js
Created June 21, 2010 19:49
Raphael line chart with custom x-axis labels demo
//based on the source of http://g.raphaeljs.com/linechart.html
var options = {
axis: "0 0 1 1", // Where to put the labels (trbl)
axisxstep: 16 // How many x interval labels to render (axisystep does the same for the y axis)
};
document.addEventListener('DOMContentLoaded', function () {
// Make the raphael object