My take is that code is not magic. Developers should always seek deeper understanding of the platforms
and languages they use. By doing so; programmers gain valuable confidence and knowledge which in turn
positively impacts code quality, system architecture and productivity.
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
SHOW ENGINE INNODB STATUS; -- InnoDB Monitor output |
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
let axios = { // mocks | |
get: function(x) { | |
return new Promise(resolve => { | |
setTimeout(() => { | |
resolve({data: x}) | |
}, 2000) | |
}) | |
}} | |
let query = 'mangos' | |
async function fetchData(query) { |
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
-- See the size of the directory | |
du -sh /directory/path |
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
-- How to tell what my timezone offset of the database is | |
select @@global.time_zone, @@session.time_zone; | |
select timediff( now(), utc_timestamp()); |
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
exports.config = { | |
// See http://brunch.io/#documentation for docs. | |
files: { | |
javascripts: { | |
joinTo: "js/app.js" | |
// To use a separate vendor.js bundle, specify two files path | |
// http://brunch.io/docs/config#-files- | |
// joinTo: { | |
// "js/app.js": /^js/, |
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
$('body').keypress(function (e) { | |
if(e.which === 13) { | |
e.preventDefault(); | |
} | |
}) |
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 csv is the CSV file with headers | |
function csvJSON(csv){ | |
var lines=csv.split("\n"); | |
var result = []; | |
var headers=lines[0].split(","); | |
for(var i=1;i<lines.length;i++){ |