This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var dateUpdated = ""; | |
var reDate = /(\d+)\/(\d+)\/(\d+)/; | |
var titleDate = jQuery('p.author a').last().attr('title'); | |
var favi = jQuery('[rel="shortcut icon"]'); | |
//Swap year and day, convert to Date obj | |
titleDate = (titleDate).replace(reDate, "$3/$2/$1"); | |
titleDate = new Date(titleDate); | |
function changeTitle() { | |
jQuery.get( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var YOUR_API_KEY = '' | |
var dateUpdated = ""; | |
function changeTitle() { | |
var favi = jQuery('[rel="shortcut icon"]'); | |
var titleDate = jQuery('p.author a').last().attr('title'); | |
var reDate = /(\d+)\/(\d+)\/(\d+)/; | |
//Swap year and day, convert to Date obj | |
titleDate = (titleDate).replace(reDate, "$3/$2/$1"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var myRe = /(\d+)\/(\d+)\/(\d+)/; | |
('15/02/2013 05:12 pm').replace(myRe, "$3/$2/$1"); | |
"2013/02/15 05:12 pm" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In [2]: run image_script.py | |
File "<ipython-input-2-f82209390f2b>", line 1 | |
run image_script.py | |
^ | |
SyntaxError: invalid syntax | |
In [3]: run image_script | |
File "<ipython-input-3-556c636d0b48>", line 1 | |
run image_script |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"msg": "1 item was added to your basket", "item": {"original_price": "60.00", "name": "era ca", "url": "/store/product/vans-era-ca-trainers-VN-0IM96GW", "brand": "Vans", "qty": 1, "selling_price": "60.00", "thumb_url": ""}, "cart_total": "420.00", "cart_item_count": 7} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.getJSON('media/js/markers.json', function(data){ | |
$.each(data.markers, function(i, marker){ | |
if (marker.tag = "foo") { | |
map.addMarker({ | |
id: i, | |
tags: marker.tag, | |
lat: marker.latitude, | |
lng: marker.longitude, | |
infoWindow: { | |
content: '<h2>' + marker.name + '</h2><p>' + marker.address + '</p>' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.getJSON('media/js/markers.json', function(data){ | |
$.each(data.markers, function(i, marker){ | |
map.addMarker({ | |
id: i, | |
tags: marker.tag, | |
lat: marker.latitude, | |
lng: marker.longitude, | |
infoWindow: { | |
content: '<h2>' + marker.name + '</h2><p>' + marker.address + '</p>' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Geolocation (doesnt seem to be workin on mobile) | |
- Click pin for more info | |
- Filter pins | |
- Add pins easily | |
- Move to cherrypy | |
- Pretty up interface |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function changeSeasons() { | |
updateSeason('#spring', 'gray', 'Winter'); | |
updateSeason('#summer', 'orange', 'Autumn'); | |
function updateSeason(sourceSeason, colour, name) { | |
var element = $(sourceSeason); | |
var newColour = colour; | |
var newName = name; | |
element.css('background-color', newColour); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Shoe(Base): | |
""" | |
Container class for our SQLAlchemy object that is actually | |
from the thbookdata django app model | |
""" | |
__tablename__ = 'bookdata_shoe' | |
__table_args__ = {'autoload': True} |