Skip to content

Instantly share code, notes, and snippets.

Matt Smith AllThingsSmitty

Block or report user

Report or block AllThingsSmitty

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@AllThingsSmitty
AllThingsSmitty / README.md
Last active Sep 27, 2019
Salesforce DX steps, tips, and tricks
View README.md

Initial Set-Up

Authenticate with Dev Hub (one time)

The Dev Hub is our production org. Scratch orgs are registered against a Dev Hub and can be managed from there. Execute the following command in a terminal (you'll be prompted to enter your username and password in a browser window):

  • sfdx force:auth:web:login --setdefaultdevhubusername -a Unum_DevHub

Set Your Default Dev Hub Username

It's possible to have multiple Dev Hub orgs. If you want to change to a different Dev Hub, you must specify your defaultdevhubusername setting with this command:

@AllThingsSmitty
AllThingsSmitty / user-story-points.md
Created May 2, 2019
User story points measured against hours estimates.
View user-story-points.md
Points Days Hours
1 <1 Up to 6
2 1 6 - 10
3 2 - 3 10 - 25
5 5 - 8 25 - 50
8 10 (entire sprint) 50 - 70
13 >10; i.e., more than one sprint*.
21 Several sprints*.
@AllThingsSmitty
AllThingsSmitty / code-highlight.css
Created Oct 31, 2017
CSS for highlighting code
View code-highlight.css
code,
pre {
background-color: rgba(0, 0, 0, 0.04);
border-radius: 3px;
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
padding: 3px;
}
code {
white-space: nowrap;
@AllThingsSmitty
AllThingsSmitty / css-reset.css
Created Oct 18, 2017
Snippet for CSS reset
View css-reset.css
*,
*:before,
*:after {
box-sizing: border-box;
margin: 0;
padding: 0;
}
@AllThingsSmitty
AllThingsSmitty / system-fonts.css
Created Jul 12, 2017
Snippet for system fonts
View system-fonts.css
body {
font-family: -apple-system,
BlinkMacSystemFont,
"Segoe UI",
Roboto,
Oxygen-Sans,
Ubuntu,
Cantarell,
"Helvetica Neue",
sans-serif;
@AllThingsSmitty
AllThingsSmitty / flexbox-center-container.css
Created Jul 7, 2017
Snippet for vertical-/horizontal-aligned container
View flexbox-center-container.css
html, body {
height: 100%;
margin: 0;
}
body {
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
display: -webkit-box;
@AllThingsSmitty
AllThingsSmitty / gist.md
Created Dec 20, 2016 — forked from mdo/gist.md
Example of how to embed a Gist on GitHub Pages using Jekyll.
View gist.md

Here's an example of how to embed a Gist on GitHub Pages:

{% gist 5555251 %}

All you need to do is copy and paste the Gist's ID from the URL (here 5555251), and add it to a gist tag surrounded by {% and %}.

@AllThingsSmitty
AllThingsSmitty / toggle.js
Created Oct 13, 2016
Toggle show/hide password
View toggle.js
function togglePassword() {
let passwordInput = document.getElementById('txtPassword');
if (passwordInput.type === 'password') {
passwordInput.type = 'text';
} else {
passwordInput.type = 'password';
}
}
(function () {
View disable-right-click.js
// credit: Louis Lazaris
window.addEventListener('contextmenu', function (e) {
console.log('context menu disabled');
e.preventDefault();
}, false);
document.addEventListener('mouseup', function (e) {
if (e.button === 2) {
console.log('right-click enabled');
}
@AllThingsSmitty
AllThingsSmitty / flexible-type.css
Last active Feb 21, 2017
Use :root for flexible type
View flexible-type.css
/* This has been added to CSS Protips https://github.com/AllThingsSmitty/css-protips */
/* The type font size in a responsive layout should be able to adjust with each viewport.
You can calculate the font size based on the viewport height and width using :root */
:root {
font-size: calc(1vw + 1vh + .5vmin);
}
/* Now you can utilize the root em unit based on the value calculated by :root */
body {
You can’t perform that action at this time.