[12:03 AM] acemarke: "controlled" and "uncontrolled" inputs
[12:04 AM] acemarke: if I have a plain, normal HTML page, and I put <input id="myTextbox" type="text" />
in my page(edited)
[12:04 AM] acemarke: and I start typing into that textbox
[12:04 AM] acemarke: it remembers what I've typed. The browser stores the current value for that input
[12:05 AM] acemarke: and then sometime later, I can get the actual element, say, const input = document.getElementById("myTextbox")
, and I can ask it for its value: const currentText = input.value;
[12:05 AM] acemarke: good so far?
[12:08 AM] acemarke: I'll keep going, and let me know if you have questions
[12:08 AM] lozio: ok, actually I'm reading
[12:09 AM] lozio: good
[12:09 AM] acemarke: so, a normal HTML input field effectively stores its own value at all times, and you can get the element and ask for its value
This file contains hidden or 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
// Navigate to http://onlinetonegenerator.com/dtmf.html | |
// Open DevTools - Console | |
// Paste the Code | |
// Press Enter | |
// Provide the number of milliseconds the default tone should hold for | |
var short = 250; | |
var long = short * 2; | |
function sleep(ms) { |
This file contains hidden or 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
require "rubygems" | |
require "twitter" | |
# get these from apps.twitter.com | |
CONSUMER_KEY = "foo" | |
CONSUMER_SECRET = "bar" | |
OAUTH_TOKEN = "blee" | |
OAUTH_TOKEN_SECRET = "baz" | |
TWITTER_USER = "your_username" # needs to be the one associated with keys above |
This file contains hidden or 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
javascript: (function() { | |
let repoName; | |
if (document.querySelectorAll('.public .author').length !== 0) { | |
repoName = document.querySelectorAll('.public .author')[0].textContent; | |
} else if (document.querySelectorAll('.private .author').length !== 0) { | |
repoName = document.querySelectorAll('.private .author')[0].textContent; | |
} | |
let repoAuthor = document.querySelectorAll('.gh-header-meta .author')[0].textContent; | |
let issueNumber = document.querySelectorAll('.gh-header-number')[0].textContent; |
This file contains hidden or 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
// This is the expanded code for the bookmarklet. | |
// Use the minified code for the actual bookmarklet | |
javascript:(function() { | |
var title = jQuery('title').text(); | |
var ticket = title.match(/\[(.*)]/); | |
var title_no_ticket = title.replace(/\[.*]\ /, ''); | |
var title_no_suffix = title_no_ticket.replace(/\ \-\ ExactTarget\ JIRA/, ''); | |
var title_cleaned = title_no_suffix.replace(/ \& /g, '_and_'); | |
title_cleaned = title_cleaned.replace(/\&/g, '/'); |
Writing git commit comments is boring. Following this guide will make it easy to make it much more fun. Inspired by this comic, Clickbait Headline Generator and this article used as a reference.
- The List
Good for fixes that required a number of discrete methods to fix something"10 antipaterns everyone knows are actually just lies"
"5 weird ways spinbox changed in just 2 weeks, the 4th will leave you speachless."
- Case Studies
Perfect for unit test commit comments (you can even use the GH Issue number as the case study number)"Case Study #1543: Does spinbox still allow exceeding maximum through manual input?"
- `"Case Study #24: Does repeater still
What is a vision?
Your vision answers the question "What do I want?" A clear vision help you communicate why you're here and what impact you're going to have.
Your vision should be aligned with the company vision, with your manager's V2MOM, and it should be personal. It should be an honest reflection of your own vision for your own work.
If you manage a team, it should be reflective of the purpose of the team and your collective impact.
This file contains hidden or 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
var mongoose = require('./index') | |
, TempSchema = new mongoose.Schema({ | |
salutation: {type: String, enum: ['Mr.', 'Mrs.', 'Ms.']} | |
}); | |
var Temp = mongoose.model('Temp', TempSchema); | |
console.log(Temp.schema.path('salutation').enumValues); | |
var temp = new Temp(); | |
console.log(temp.schema.path('salutation').enumValues); |