Skip to content

Instantly share code, notes, and snippets.

package main
import (
"net/http"
"database/sql"
"fmt"
"log"
"os"
)
@Takazudo
Takazudo / dateconvert.js
Created March 9, 2012 16:03
Backbone.js date convert
var MyModel = Backbone.Model.extend({
initialize: (attrs){
var self = this;
self.updateDate();
self.bind('change:date', function(){
self.updateDate();
});
},
updateDate: function(){
var date = this.get('date');
@kostiklv
kostiklv / remember_password.html
Created May 12, 2011 16:53
How to make browser's remember password work with dynamic/AJAX login form
<html>
<!--
This is an example of how to make browsers
offer to remember password and later fill in those passwords
for dynamic login forms.
To make the browser offer to remember passwords the form should be actually submitted.
Since we are handling login with AJAX we don't want the form to submit, so we are still submitting it
into a dummmy iframe with dummy URL.
It's good idea to actually create empty dummy.html file, otherwise you'll flood you error.log with 404s