Skip to content

Instantly share code, notes, and snippets.

View johnkingzy's full-sized avatar
🎯
Focusing

Kingsley Solomon johnkingzy

🎯
Focusing
View GitHub Profile
@johnkingzy
johnkingzy / getdates.js
Last active February 19, 2018 22:31 — forked from miguelmota/getDates.js
Get dates in between two dates with JavaScript.
// Returns an array of dates between the two dates
var getDates = function(startDate, endDate) {
var dates = [],
currentDate = startDate,
addDays = function(days) {
var date = new Date(this.valueOf());
date.setDate(date.getDate() + days);
return date;
};
while (currentDate <= endDate) {
@andyvanee
andyvanee / .ssh_config
Last active November 30, 2023 04:19
Fix unix_listener too long for Unix domain socket
Host *
ControlPath ~/.ssh/control/%C
ControlMaster auto
@webarthur
webarthur / pure-slidedown-slideup.css
Last active December 18, 2023 07:47
Pure CSS slidedown / slideup animation using transform translateY
.slide-up, .slide-down {
overflow:hidden;
}
.slide-up > div, .slide-down > div {
transform: translateY(-100%);
transition: .4s ease-in-out;
}
.slide-down > div {
transform: translateY(0);
}
@osvik
osvik / manual-gzip-howto-and-test.html
Created August 10, 2014 17:08
How to manually gzip CSS and JS files and serve them with Apache
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Manually gzip CSS and JS files</title>
<link rel="stylesheet" href="bootstrap-custom.min.css" type="text/css">
<script src="header-scripts.min.js"></script>
</head>
@miguelmota
miguelmota / getDates.js
Last active February 7, 2024 23:43
Get dates in between two dates with JavaScript.
// Returns an array of dates between the two dates
function getDates (startDate, endDate) {
const dates = []
let currentDate = startDate
const addDays = function (days) {
const date = new Date(this.valueOf())
date.setDate(date.getDate() + days)
return date
}
while (currentDate <= endDate) {