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
<div id="fb-root"></div> | |
<script> | |
window.fbAsyncInit = function() { | |
FB.init({ | |
appId: 'xxxxxxxxxxxxx', | |
status: true, | |
cookie: true, | |
xfbml: true | |
}); |
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
global | |
nbproc 1 | |
maxconn 65536 | |
defaults | |
timeout connect 5s | |
timeout queue 5s | |
timeout server 30s | |
timeout tunnel 1h |
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 getPhoto() { | |
navigator.camera.getPicture(onPhotoSuccess, onPhotoFail, | |
{quality: 70, targetWidth: 500, targetHeight: 500, | |
sourceType: navigator.camera.SourceType.PHOTOLIBRARY, | |
destinationType: navigator.camera.DestinationType.FILE_URI, | |
}); | |
} | |
function onPhotoSuccess(imageUri) { | |
var $img = $('<img/>'); |
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
# Add these methods to your ApplicationController. Then, any controller | |
# that inherits from it will have these methods and can programmatically | |
# determine what filters it has set. | |
class ApplicationController < ActionController::Base | |
def self.filters(kind = nil) | |
all_filters = _process_action_callbacks | |
all_filters = all_filters.select{|f| f.kind == kind} if kind | |
all_filters.map(&:filter) | |
end |
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
import "com.vividsolutions.jump.workbench.ui.AttributeTab" | |
import "com.vividsolutions.jump.workbench.ui.LayerViewPanel" | |
workbench_frame = $wc.workbench.frame | |
menu_bar = workbench_frame.get_jmenu_bar() | |
tool_bar = workbench_frame.get_tool_bar() # as JToolBar | |
layer_name_popup_menu = workbench_frame.get_layer_name_popup_menu() | |
category_popup_menu = workbench_frame.get_category_popup_menu() |
NewerOlder