remove all containers
docker rm -f $(docker ps -aq)
Get ip address of container
export default function getScrollbarWidth() { | |
// Creating invisible container | |
const outer = document.createElement("div"); | |
outer.style.visibility = "hidden"; | |
outer.style.overflow = "scroll"; // forcing scrollbar to appear | |
// @ts-ignore | |
outer.style.msOverflowStyle = "scrollbar"; // needed for WinJS apps | |
document.body.appendChild(outer); |
#!/bin/sh | |
# This script generates a ssh key for a single repository | |
# and adds a custom configuration to the users (not global) ssh config file, | |
# and outputs the public key for you to copy and paste as the repo deploy key | |
# and outputs the url for you to clone the repo on the machine. | |
# Github docs ref: | |
# https://docs.github.com/en/developers/overview/managing-deploy-keys#using-multiple-repositories-on-one-server | |
# | |
# 1. Add the script to the user account of the machine. The home directory is fine. | |
# 2. Make the script executable by running the following command as the user: |
sup { | |
vertical-align: baseline; | |
font-feature-settings: "sups"; | |
font-size: 1em; | |
} | |
sub { | |
vertical-align: baseline; | |
font-feature-settings: "subs"; | |
font-size: 1em; | |
} |
#!/bin/sh | |
# This script generates a ssh key for a single repository | |
# and adds a custom configuration to the users (not global) ssh config file, | |
# and outputs the public key for you to copy and paste as the repo deploy key | |
# and outputs the url for you to clone the repo on the machine. | |
# Github docs ref: | |
# https://docs.github.com/en/developers/overview/managing-deploy-keys#using-multiple-repositories-on-one-server | |
# | |
# 1. Add the script to the user account of the machine. The home directory is fine. | |
# 2. Make the script executable by running the following command as the user: |
src: https://superuser.com/a/1419434
nmap -sP 192.168.0.0/24
// Replace letters | |
@function str-replace($string, $search, $replace: '') { | |
$index: str-index($string, $search); | |
@if $index { | |
@return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace); | |
} | |
@return $string; | |
} |
// src: https://github.com/LeCoupa/awesome-cheatsheets | |
// Date Object CheatSheet | |
// The Date object is used to work with dates and times. | |
// More: http://www.w3schools.com/jsref/jsref_obj_date.asp | |
// 1. Instantiating a Date. | |