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
// Creates news card inner html | |
var postInnerHtml = function(post) { | |
content = ''; | |
content += '<div style="background:url('+post.image+') center center no-repeat transparent; background-size: cover;text-align:center" ><a href="'+post.url+'" title="'+post.linkTitle+'" target="_blank"> <h5 class="titolo-news" style="margin-top:5px;" ><img src="img/spacer.gif" class="youtubeIcon" /></a></div>'; | |
content += '<a href="'+post.url+'" title="'+post.title+'" target="_blank"> <h5 class="titolo-news" style="margin-top:5px;" >'+post.title+'</h5></a>'; | |
return content; | |
} | |
var createSliderItem = function(data, index) { | |
// Set as active slide if first | |
var activeClass = index == 0 ? ' active' : '' |
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
ubuntu@ip-172-31-18-106:~$ instanceid=`curl http://169.254.169.254/latest/meta-data/instance-id` | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
100 19 100 19 0 0 14393 0 --:--:-- --:--:-- --:--:-- 19000 | |
ubuntu@ip-172-31-18-106:~$ pid=`ps -U solr h | awk '{print $1}'` | |
ubuntu@ip-172-31-18-106:~$ num_files=`sudo ls /proc/$pid/fd |wc -l` | |
ubuntu@ip-172-31-18-106:~$ aws cloudwatch put-metric-data --metric-name SolrOpenFileHandles\ --value $num_files --namespace "EC2" --region eu-central-1\ --dimensions "InstanceId=$instanceid" | |
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters] | |
To see help text, you can run: |
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
Uncaught TypeError: s.once is not a function | |
at o (jwplayer.js:3) | |
at j.setContainer (jwplayer.js:3) | |
at k.changeVideoProvider (jwplayer.js:2) | |
at k.setActiveItem (jwplayer.js:2) | |
at D (jwplayer.js:2) | |
at s.q (jwplayer.js:2) | |
at g (jwplayer.js:1) | |
at e.trigger (jwplayer.js:1) | |
at l (jwplayer.js:3) |
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
Uncaught TypeError: s.partials is not a function | |
at eval (eval at evaluate (:85:21), <anonymous>:1:10) | |
at o (http://52.23.198.94/revive/www/admin/plugins/rtb/js/jwplayer.js:3:12168) | |
at j.setContainer (http://52.23.198.94/revive/www/admin/plugins/rtb/js/jwplayer.js:3:13572) | |
at k.changeVideoProvider (http://52.23.198.94/revive/www/admin/plugins/rtb/js/jwplayer.js:2:25061) | |
at k.setActiveItem (http://52.23.198.94/revive/www/admin/plugins/rtb/js/jwplayer.js:2:25859) | |
at D (http://52.23.198.94/revive/www/admin/plugins/rtb/js/jwplayer.js:2:3775) | |
at s.q (http://52.23.198.94/revive/www/admin/plugins/rtb/js/jwplayer.js:2:129) | |
at g (http://52.23.198.94/revive/www/admin/plugins/rtb/js/jwplayer.js:1:15544) | |
at e.trigger (http://52.23.198.94/revive/www/admin/plugins/rtb/js/jwplayer.js:1:14947) |
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
public static string Aggiorna(string classe, string parametri) | |
{ | |
int id; | |
string aggiornato = ""; | |
ClasseCollegataAUnRecordSuDB_Base classeCollegata = ritornaIstanza(classe); | |
JObject par = JObject.Parse(parametri); |
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
//Application That lists all the attributes of the elements inside html text in a textarea | |
var elements = $('<div>'+$('textarea').val()+'</div>').find('*'); | |
elements.each(function() { | |
var el = this; | |
var style = ""; | |
console.log(el); | |
$.each(el.attributes, function() { | |
console.log(this.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
.... | |
app.post('/myfunction', controller.myFunction); | |
... |
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
var images = gallery.images; | |
for (var i = 0; i < images.length; i++ ) | |
{ | |
console.log(JSON.stringify(images[i])); | |
for (var key in images[i]) | |
{ | |
(function (key) { | |
if (images[i].hasOwnProperty(key)) | |
{ |
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
var sizes = { | |
'-small' : 200, | |
'-medium': 600, | |
'-large' : 1040, | |
} | |
for (var suffix in sizes){ | |
if (sizes.hasOwnProperty(suffix)) { | |
var finalName = uploadUrl+fileName+suffix+fileExtension; | |
var stream = fs.createWriteStream(finalName); |
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
class BooksController < ApplicationController | |
def index | |
@books = Book.all # # this variable doesn't get loaded with " render " | |
respond_to do |format| | |
format.html | |
format.yaml { render text:@books.to_yaml } | |
format.json { render text:@books.to_json } |