Value | Color |
---|---|
\e[0;30m | Black |
\e[0;31m | Red |
\e[0;32m | Green |
\e[0;33m | Yellow |
\e[0;34m | Blue |
\e[0;35m | Purple |
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
color_root=$(tput setaf 1) | |
color_user=$(tput setaf 2) | |
color_sudo=$(tput setaf 3) | |
color_reset=$(tput sgr0) | |
// root user | |
if (( EUID == 0 )); then | |
PS1="\\[$color_root\\]$PS1\\[$color_reset\\]" | |
// sudo user | |
elif [[ $SUDO_USER ]]; then |
I hereby claim:
- I am iamnewton on github.
- I am chrisopedia (https://keybase.io/chrisopedia) on keybase.
- I have a public key whose fingerprint is 6AE7 083D 4404 07C0 7EB1 18EA 3802 412D 8420 6E38
To claim this, I am signing this object:
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
// I provide a logging API that has some special sauce for formatting. | |
const echo = (function() { | |
let queue = []; | |
var ECHO_TOKEN = {}; | |
const RESET_INPUT = "%c "; | |
var RESET_CSS = ""; | |
// Attach formatting utility method. | |
function alertFormatting (value) { | |
queue.push({ |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout. This is also called reflow or layout thrashing, and is common performance bottleneck.
elem.offsetLeft
,elem.offsetTop
,elem.offsetWidth
,elem.offsetHeight
,elem.offsetParent
elem.clientLeft
,elem.clientTop
,elem.clientWidth
,elem.clientHeight
elem.getClientRects()
,elem.getBoundingClientRect()
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
/* Smartphones (portrait and landscape) ----------- */ | |
@media only screen and (min-device-width : 320px) and (max-device-width : 480px) { | |
/* Styles */ | |
} | |
/* Smartphones (landscape) ----------- */ | |
@media only screen and (min-width : 321px) { | |
/* Styles */ | |
} |
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
/* | |
* get the active selected sheet; | |
*/ | |
const SHEET = SpreadsheetApp.getActiveSheet(); | |
// ranges are equivalent to rows in this context, but in reality are more | |
// like A2:B2 which means Column A, Row 2 through Column B, Row 2 | |
// this method pulls back all information from the first column, first row | |
// to the last column, last row | |
// | | A | B | C | |
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
/// Rounded corners on images | |
/// @author Newton Koumantzelis | |
/// @since 1.0.0 - The Sith | |
/// @example html | |
/// <img src="" class="img-broken" alt="Generic image"> | |
.img-broken { | |
position: relative; | |
min-height: 3rem; | |
&::before, |
NewerOlder