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 IsJsonString(str) { | |
try { | |
JSON.parse(str); | |
} catch (e) { | |
return false; | |
} | |
return true; | |
} |
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
//PROCESS MANAGEMENT | |
//see all processes | |
# ps aux | less | |
//select all processes | |
# ps -A | |
//The top program provides a dynamic real-time view of a running system. Type the top at command prompt: | |
# top |
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
// https://github.com/meteor/meteor/blob/devel/examples/todos/server/bootstrap.js | |
// if the database is empty on server start, create some sample data. | |
Meteor.startup(function () { | |
if (Lists.find().count() === 0) { | |
var data = [ | |
{name: "Name", | |
contents: [ | |
["A", "B", "C"], | |
["One Language", "Simplicity", "Fun"] |
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
$( document ).ready(function(){ | |
var w = checkWindowSize(); | |
$("body").removeClass("tiny small medium large xlarge huge"); | |
if(w.size){ $("body").addClass(w.size) }; | |
}); | |
$( window ).resize(function() { | |
var w = checkWindowSize(); | |
$("body").removeClass("tiny small medium large xlarge huge"); | |
if(w.size){ $("body").addClass(w.size) }; |