Skip to content

Instantly share code, notes, and snippets.

View kevinongit's full-sized avatar

Kevin kevinongit

View GitHub Profile
@kevinongit
kevinongit / curl.md
Created May 19, 2023 00:41 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

https://www.udemy.com/course/advanced-javascript-concepts/
https://www.udemy.com/course/server-side-rendering-with-react-and-redux/
https://www.udemy.com/course/tailwind-from-scratch/
https://www.udemy.com/course/react-for-senior-engineers/
@kevinongit
kevinongit / JS: Calc business days Monday to Friday
Created July 4, 2022 07:16 — forked from mazfreelance/JS: Calc business days Monday to Friday
Javascript : Calculate business days between two (2) dates, business days (Monday to Friday)
function calculateBusinessDays(startDate, endDate){
// Validate input
if (endDate < startDate)
return 0;
// Calculate days between dates
var millisecondsPerDay = 86400 * 1000; // Day in milliseconds
startDate.setHours(0,0,0,1); // Start just after midnight
endDate.setHours(23,59,59,999); // End just before midnight
var diff = endDate - startDate; // Milliseconds between datetime objects
@kevinongit
kevinongit / index.html
Created November 8, 2021 23:45 — forked from ScottWhittaker/index.html
Redux: Writing a Counter Reducer with Tests
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Getting Started with Redux</title>
<script src="https://wzrd.in/standalone/expect@latest"></script>
<script src="script.js"></script>
</head>
<body>
/**
* covert canvas to image
* and save the image file
*/
var Canvas2Image = function () {
// check if support sth.
var $support = function () {
var canvas = document.createElement('canvas'),