Skip to content

Instantly share code, notes, and snippets.

View salami-art's full-sized avatar

salami-art

View GitHub Profile
....
app.post('/myfunction', controller.myFunction);
...
//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);
});
public static string Aggiorna(string classe, string parametri)
{
int id;
string aggiornato = "";
ClasseCollegataAUnRecordSuDB_Base classeCollegata = ritornaIstanza(classe);
JObject par = JObject.Parse(parametri);
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)
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)
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:
// 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' : ''
#
# Here we manage the action of creating a new question.
#
angular.module('pazienti_light').controller "QuestionsNewCtrl", ['$scope', '$modal', '$http', 'current_session', ($scope, $modal, $http, current_session)->
$scope.question =
description: ""
$scope.ask = (question)->
#
# Here we manage the action of creating a new question.
#
angular.module('mymodule_light').controller "QuestionsNewCtrl", ['$scope', '$modal', '$http', 'current_session', ($scope, $modal, $http, current_session)->
$scope.question =
description: ""
$scope.ask = (question)->
# THIS IS TOTALLY RENEWED - BE CAREFUL
angular.module('pazienti_light').controller "LoginCtrl", ['$scope', 'current_session', 'Session', 'MultiForm',
($scope, current_session, Session, MultiForm)->
$scope.MultiForm = MultiForm
# INITIALIZING PROFILE