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
/** | |
* Get a local cache manager. It's not replicated nor distributed in any | |
* way. | |
* @return | |
*/ | |
public static BasicCacheHandler getCacheManager(){ | |
//We jump through these hoops so we don't have to deploy a ehcache.xml | |
if (cache_manager==null) { | |
// Trying not to make the lock | |
synchronized (CacheHandler.class) { |
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
Hi again, | |
I stumbled across you "Forwarded http Extension" (http://tools.ietf.org/html/draft-petersson-forwarded-for-02) a week ago and have been thinking about it a bit more; One thing that I think the draft currently is missing is a way to disclose to the backend the full URL that was used for the original request. | |
There are two things missing: | |
Which resource was requested in the original request. If a request to http://myserver.com/hello/index.jsp is proxied to http://myserver.com/hello2/index.jsp it would be highly useful for the backend to know that the original request was /hello/index.jsp and not /hello2/index.jsp. While a frontend webserver could potentially correct redirects (301s and 302s, example: http://wiki.nginx.org/HttpProxyModule#proxy_redirect) there are also occasions when the backend would like to know about the original request being made. Examples are to have correct links/URLs to media files (images, CSS, JavaScript etc.). | |
Which port that was used on the original request. While I hav |
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
# 'check_https_hostname_on_port' command definition | |
define command{ | |
command_name check_https_hostname_on_port | |
command_line /usr/lib/nagios/plugins/check_http --ssl -H '$HOSTNAME$' -I '$HOSTADDRESS$' -p '$ARG1$' | |
} |
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 mock | |
files_opened = [] | |
real_open = open # Needed since I will wrap open | |
def open_wrapper(*args, **kw): | |
opened_file = mock.MagicMock(wraps=real_open(*args, **kw)) | |
files_opened.append(opened_file) | |
return opened_file | |
open_mock = mock.MagicMock(side_effect=open_wrapper) | |
open_mock.__enter__.side_effect = open_wrapper |
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
"{\"coordinates\":null,\"in_reply_to_user_id\":159938854,\"truncated\":false,\"text\":\"@dstorna \\n\\u0627\\u062e\\u0648\\u064a \\u0639\\u0628\\u062f\\u0627\\u0644\\u0644\\u0647 \\u0627\\u0644\\u0631\\u0624\\u064a\\u0629 \\u062d\\u0642 \\u0648\\u0627\\u0644\\u062a\\u0641\\u0633\\u064a\\u0631 \\u0627\\u0644\\u0627\\u0648\\u0644 \\u0644\\u0647\\u0627 \\u064a\\u0642\\u0639 \\u0642\\u062f \\u064a\\u0636\\u062d\\u0643 \\u0627\\u062d\\u062f \\u0645\\u0639\\u0643 \\u0648\\u064a\\u0641\\u0633\\u0631\\u0647\\u0627 \\u0628\\u0633\\u0648\\u0621\",\"id_str\":\"234786337595727874\",\"entities\":{\"hashtags\":[],\"urls\":[],\"user_mentions\":[{\"indices\":[0,8],\"id_str\":\"159938854\",\"name\":\"\\u0639\\u0628\\u062f\\u0627\\u0644\\u0644\\u0647 \\u0627\\u0644\\u0634\\u0644\\u0627\\u062d\\u064a\",\"screen_name\":\"dstorna\",\"id\":159938854}]},\"place\":null,\"retweet_count\":0,\"favorited\":false,\"geo\":null,\"source\":\"\\u003Ca href=\\\"http:\\/\\/twitter.com\\/download\\/iphone\\\" rel=\\\"nofollow\\\"\\u003ETwitter |
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
#!/bin/bash | |
# This has to be run from master | |
git checkout master | |
# Update our list of remotes | |
git fetch | |
git remote prune origin | |
# Remove local fully merged branches |
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
Hej! Du har nu förbrukat mer data än vad som ingår i ditt datapaket och detta är därför avstängt. Kontakta vår support så hjälper vi dig att komma igång igen! |
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
<!-- begin SnapEngage code --> | |
<script type="text/javascript"> | |
(function() { | |
var se = document.createElement('script'); se.type = 'text/javascript'; se.async = true; | |
se.src = '//commondatastorage.googleapis.com/code.snapengage.com/js/14391f77-8239-4b6f-a2d3-1f31f20d14b1.js'; | |
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(se, s); | |
})(); | |
SnapABug.allowOffline(false); | |
</script> | |
<!-- end SnapEngage code --> |
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
Two rows. Each row contain two columns. |
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
jQuery.ready(function() { | |
$('.accordion').on('hide', function(e) { | |
$(e.target).parent().find('.accordion-toggle').first().removeClass('active'); | |
}).on('show', function(e) { | |
$(e.target).parent().find('.accordion-toggle').first().addClass('active'); | |
}); | |
}) |
OlderNewer