This file contains hidden or 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
from pyramid.paster import get_app | |
application = get_app( | |
'/Users/chrism/modwsgi/env/myapp/production.ini', 'main') |
This file contains hidden or 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
1369463461554 duino write 0204000 | |
{ '0': 'info', '1': 'digitalRead from pin 04' } | |
1369463461554 duino write 0204000 | |
1369463461560 duino receive | |
1369463461561 duino receive 04::00 | |
{ '0': 'info', '1': 'digitalRead from pin 04' } | |
1369463461604 duino write 0204000 | |
{ '0': 'info', '1': 'digitalRead from pin 04' } | |
1369463461604 duino write 0204000 | |
04::003461609 duino receive 04::00 |
This file contains hidden or 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 ajaxStuff1(value){ | |
//do some ajax stuff with a value with a value parameter | |
} | |
function ajaxStuff2(value){ | |
//do some other ajax stuff with a value parameter | |
} | |
var doStuffWhenSelectIsChanged = function(theId, ajaxStuff){ | |
$(theId).change(function(){ |
This file contains hidden or 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
@view_config(route_name='members', renderer='json') | |
def hello_world(request): | |
user_dict = dict(spencer=users) | |
serialized_user = [ | |
serialize(user) | |
for user in DBSession.query(User).all() | |
] | |
This file contains hidden or 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
require 'zip/zip' | |
the_file = 'Nectir.zip' | |
the_directory = './directory' | |
def unzip(zip, unzip_dir, remove_after = false) | |
Zip::ZipFile.open(zip) do |zip_file| | |
zip_file.each do |f| | |
f_path=File.join(unzip_dir, f.name) |
This file contains hidden or 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
//using leaflet.js | |
var theMap = L.map('the_map_div', { | |
center: whereYouWantToCenterYourMap, | |
layers: mapBoxLayer, | |
zoom: 11, | |
maxZoom: 18 | |
}); | |
var theFeaures = geoJsonObjectThatYouSentMe; |
This file contains hidden or 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
/*this will not show up*/ | |
.channels-pane | |
overflow-y:scroll | |
/*this will throw an error*/ | |
.channels-pane | |
overflow-y:scroll; |
This file contains hidden or 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
ul.sub-menu{ | |
z-index:2; | |
} | |
ul.portfolio-item-filter{ | |
z-index:1; | |
} |
This file contains hidden or 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(){ | |
wax.tilejson('http://a.tiles.mapbox.com/v3/stevef22.map-lts93ykh.jsonp', | |
function(tilejson) { | |
var map = new L.Map('map-div') | |
.addLayer(new wax.leaf.connector(tilejson)) | |
.setView(new L.LatLng(29.409694, -98.490372), 13); | |
This file contains hidden or 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
$.ajax({ | |
url: "test.html", | |
context: document.body | |
}).done(function() { | |
$(this).addClass("done"); | |
}); |