Skip to content

Instantly share code, notes, and snippets.

View jerry42's full-sized avatar

Jérémy Sculfort jerry42

View GitHub Profile
"use strict";
const shell = require("shelljs"); // npm install shelljs
const args = process.argv;
// updateVersion.js [version] [filter=optional]
let filter = "";
if (args[2] == undefined) {
console.log(`You must enter a alias name`);
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Google Maps Blue Dot</title>
<style>
#map {
height: 100%;
}
"use strict"
const shell = require("shelljs")
const args = process.argv
if (args[2] == undefined) {
console.log(`You must enter your policy name`)
return false
}
const policyName = args[2]
@jerry42
jerry42 / convertDateMoment.js
Last active September 8, 2020 11:09
ES6 script to update MySQL DATETIME to local ( Lang & Timezone ) date in HTML on document ready
# HTML example <span class="dateTZ">2020-09-08 13:07:42</span>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.27.0/moment-with-locales.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment-timezone/0.5.31/moment-timezone-with-data.min.js"></script>
<script>
function updateDateLocalTZ(classID)
{
$(`.${classID}`).html(moment.tz(moment.utc($(`.${classID}`).html()), moment.tz.guess(true)).format('llll'))
}
$( document ).ready(function() {
@jerry42
jerry42 / gist:b639773c86e5c3fd867a71c3cd5943c5
Created February 8, 2020 16:13
Check/Uncheck list checkbox
$('.classCheckbox').each(function() {
if ($(this).is(':checked') && $('#master_checkbox').is(':checked') == false)
$(this).trigger('click');
else if (!$(this).is(':checked') && $('#master_checkbox').is(':checked') == true)
$(this).trigger('click');
});