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
<script type="text/javascript"> | |
function recordOutboundLink(link, category, action) { | |
_gat._getTrackerByName()._trackEvent(category, action); | |
setTimeout('document.location = "' + link.href + '"', 100); | |
} | |
</script> | |
<%= render "shared/analytics" %> | |
<script type="text/javascript"> | |
function recordOutboundLink(link, category, action) { | |
_gat._getTrackerByName()._trackEvent(category, action); |
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
<script type="text/javascript"> | |
$(function() { | |
updateState(); | |
$("#front_stat").submit(function() { | |
updateState(); | |
return false; | |
}); | |
}); | |
function updateState(){ |
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
curl -v -H "Accept: application/json" -H "Ctent-type: application/json" -X POST -d ' {"answer":{"it_description": "grtgrt"}}' http://localhost:3000/api/v1/risposte/15712/save_answer |
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
For Apache, use the Location directive into your virtual host(be sure you have included expires and headers modules) | |
<LocationMatch "^/assets/.*$"> | |
Header unset ETag | |
FileETag None | |
ExpiresActive On | |
ExpiresDefault "access plus 30 days" | |
</LocationMatch> | |
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
/etc/varnish/default.vcl | |
backend default { | |
.host = "127.0.0.1"; | |
.port = "8080"; | |
} | |
acl purge { | |
"localhost"; | |
} |
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
fork do | |
ActiveRecord::Base.establish_connection | |
for i in 0..20000 | |
puts 'I m in sub process-1' | |
end | |
exit | |
end | |
fork do | |
ActiveRecord::Base.establish_connection | |
for i in 2001..40000 |
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
def draw_image | |
#Image parameters | |
options = {:img_width => 300, :img_height => 250, :text_color => "#FF0000", :font_size => 36, | |
:text => "This is text", :bg_color => "#EFEFEF"} | |
#Initialize a container with it's width and height | |
container=Magick::Image.new(options[:img_width],options[:img_height]){ | |
self.background_color = options[:bg_color] | |
} |
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
if $scope.session.current.doctor_profile.is_active | |
$http.get("/api/v1/users/0/assigned_questions").success( | |
(r)-> | |
newr = [] | |
for e in r | |
e.replying = false | |
e.autoAssigned = false | |
newr.push e | |
$http.get("/api/v1/auto_assigned_questions.json").success( | |
(resp)-> |
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
def self.update_profile(user) | |
begin | |
social_media_info = user.social_media_info | |
if social_media_info.present? | |
social_media_info = JSON.parse(social_media_info.information) | |
raw_info = social_media_info['extra']['raw_info'] | |
social_media_info = social_media_info['info'] | |
if raw_info['gender'] == 'male' | |
sex = 'm' | |
elsif raw_info['gender'] == 'female' |
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
<meta name="twitter:card" content="summary"> | |
<meta name="twitter:site" content="@pazienti"> | |
<meta name="twitter:title" content="Dr. Linnea Passaler"> | |
<meta name="twitter:description" content="Mi occupo di implantologia e parodontologia: inserimento di impianti quando i denti non ci sono più e malattie delle gengive (parodontite, piorrea)"> | |
<meta name="twitter:creator" content="@pazienti"> | |
<meta name="twitter:image:src" content="http://localhost:3000/system/doctor_profiles/avatars/000/000/124/medium/dr-linnea-passaler.jpg?1354807780"> |
OlderNewer