Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am markcarrrr on github.
  • I am markcarrrr (https://keybase.io/markcarrrr) on keybase.
  • I have a public key ASC0b7dJiumX0-yD8chEe5v1Wlve16jlhsAsIvkwqhTUjAo

To claim this, I am signing this object:

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Page</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="styles.css">
</head>
somePromise().then(function () {
return anotherPromise();
}).then(function () {
return yetAnotherPromise();
}).catch(console.log.bind(console));
@markcarrrr
markcarrrr / flexbox.css
Last active April 18, 2018 18:25
Fix for issue in Safari when wanting to use 'position: absolute;' with flexbox
/**
* Flexbox styles so Safari respects position: relative; on the flex item.
*/
.flex-box {
display: flex;
}
.flex-item {
display: flex; /* Fixes Safari issue with position: relative; */
.select2-selection__choice:first-child .select2-selection__choice__remove,
.select2-search--hide,
.select2-search {
display: none;
}
.select2-hidden-accessible {
border: 0 !important;
clip: rect(0 0 0 0) !important;
height: 1px !important;
@markcarrrr
markcarrrr / chosen-theme-standard-multi-nosearch
Created June 21, 2016 08:58
Basic SASS styling for 'chosen' custom select for standard and multi select without search.
.chosen-container {
position: relative;
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
width: auto !important; // Overwrite style set with JS
ul {
margin: 0;
padding: 0;
@markcarrrr
markcarrrr / CLI commands.md
Last active March 11, 2018 13:36
A list of common CLI keyboard commands

Ctrl+U - Clear all left of cursor
Ctrl+C - Cancel the current command/line
Ctrl+A - Goto the beginning of the line
Ctrl+E - Goto the end of the line
Ctrl+K - Remove all to the right
Ctrl+W - Remove whole word to the left
Ctrl+Y - Reinstate deleted command
Ctrl+L - Scroll prompt to top

@markcarrrr
markcarrrr / disable console.log
Last active August 29, 2015 14:06
JavaScript - Disable console.log
// Use snippet below to disable console.X if not supported to prevent JS errors
if(typeof console === 'undefined') {
console = {
log: function() { },
debug: function() { },
table: function() { }
};
}
@markcarrrr
markcarrrr / .gitconfig
Created September 17, 2014 09:35
.gitconfig - Beyond Compare
[diff]
tool = bc3
[difftool]
prompt = false
[difftool "bc3"]
cmd = \"C:/Program Files (x86)/Beyond Compare 4/bcomp.exe\" \"$LOCAL\" \"$REMOTE\"
[merge]
tool = bc3
[mergetool]
prompt = false
.widthCalc(@width, @minus) {
width: ~"-webkit-calc(@{width} - @{minus})";
width: ~"calc(@{width} - @{minus})";
}