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 eltafans.com/3/powerplus-redshop -v | |
* About to connect() to eltafans.com port 80 (#0) | |
* Trying 174.143.122.1... connected | |
> GET /3/powerplus-redshop HTTP/1.1 | |
> User-Agent: curl/7.22.0 (x86_64-unknown-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.0e zlib/1.2.5 libssh2/1.3.0 | |
> Host: eltafans.com | |
> Accept: */* | |
> | |
< HTTP/1.1 200 OK | |
< Date: Wed, 16 Nov 2011 15:33:55 GMT |
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 i in {1..10}; do curl http://eltafans.com/3/powerplus-redshop | wc; done | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
100 1406 100 1406 0 0 1770 0 --:--:-- --:--:-- --:--:-- 2221 | |
39 137 1406 | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
100 1406 100 1406 0 0 1064 0 0:00:01 0:00:01 --:--:-- 1212 | |
39 137 1406 | |
% Total % Received % Xferd Average Speed Time Time Time Current |
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
map $remote_addr $proxyaddr{ | |
default http://10.0.0.5:8001; | |
10.0.1.7 http://10.0.1.7:8001; | |
} | |
server { | |
listen 8001; | |
server_name 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
table | |
thead | |
tr | |
th Name | |
th Age | |
th Gender | |
tbody | |
tr | |
td Eirik | |
td 25 |
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() { | |
$('.ms-socialCommentEdit').each(function() { | |
var $wp = $(this).closest('[webpartid]'); | |
var $search = $('<input>').keyup(function() { | |
$wp.find('.ms-socialCommentItem').hide(); | |
$wp.find('.ms-socialCommentItem').filter(function() { | |
return $(this).find('.socialcomment-contents').text().toLowerCase().indexOf($search.val().toLowerCase()) >= 0; | |
}).show(); | |
}); | |
$wp.prepend($search); |
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 SPGetSPcurrentUser = function(callback) { | |
var spuserid = "Error"; | |
var context = new SP.ClientContext.get_current(); | |
// Using this here would make it global, as the function is not called with 'new' | |
// and this would then point to the global object, window | |
//this.website = context.get_web(); | |
var website = context.get_web(); | |
var currentUser = website.get_currentUser(); | |
context.load(currentUser); | |
context.executeQueryAsync( |
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
protected void Application_PreRequestHandlerExecute() | |
{ | |
if (!(Context.Handler is IRequiresSessionState)) return; | |
var authenticationCookie = Request.Cookies[FormsAuthentication.FormsCookieName]; | |
if (authenticationCookie == null) return; | |
var authenticationTicket = FormsAuthentication.Decrypt(authenticationCookie.Value); | |
if (authenticationTicket == null || authenticationTicket.Expired) return; |
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
<p>Lagre som bookmarks/favoritter:</p> | |
<p> | |
<a href="javascript:$('div[class*=prod]').sort(function(a,b){function d(x){var d=$(x).find('.value').text().match(/\d+/);if(!d)return 0;return parseInt(d[0],10)};return d(b)-d(a)}).each(function(i){$('div[class*=prod]').eq(i).replaceWith(this)});">Komplettsalg - prosent</a> | |
</p> | |
<p> | |
<a href="javascript:$('div[class*=prod]').sort(function(a,b){function d(x,y){var d=$(x).find(y).text().replace(/\./g,'').match(/\d+/);return d?parseInt(d[0]):0}function dd(x){return d(x,'.priceBefore')-d(x,'.price')}return dd(b)-dd(a)}).each(function(i){$('div[class*=prod]').eq(i).replaceWith(this)});">Komplettsalg - prisforskjell</a> | |
</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
$('head').append($('<link rel="stylesheet">').attr('href', 'http://twitter.github.com/bootstrap/assets/css/bootstrap.css')); | |
$.getScript('http://twitter.github.com/bootstrap/assets/js/bootstrap-transition.js', function() { | |
$.getScript('http://twitter.github.com/bootstrap/assets/js/bootstrap-collapse.js', function() { | |
var $collapse = $('<div class="accordion">'); | |
var $tplHead = $('<div class="accordion-heading"><a class="accordion-toggle" data-toggle="collapse">'); | |
var $tplBody = $('<div class="accordion-body collapse"><div class="accordion-inner">'); | |
$('.s4-ba .s4-wpTopTable:has([webpartid])').each(function(i) { | |
var $wp = $(this); | |
var $content = $wp.find('[webpartid]'); | |
var $head = $tplHead.clone(); |