git log --graph --all --decorate --pretty --oneline
| function makeBackgroundBlack() { | |
| document.body.style.backgroundColor = '#000000'; | |
| } | |
| makeBackgroundBlack(); | |
| /* | |
| - browser parses html | |
| - browser sees <script> - blocks (and downloads if src attr) |
- Create new user (e.g.
webhook) with the following permissions:Overall > Read,Job > Build,Job > Read&Job > Workspace. Login as the user and get their API token - Under a job, enable "Trigger Builds Remotely" and set an authentication token
- Trigger a POST request with the following structure:
http://{USER}:{API_TOKEN}@{JENKINS_URL}/job/{JOB}/build?token={AUTHENTICATION_TOKEN}
| function anAction () { | |
| return function (dispatch) { | |
| dispatch(requestStarted()) | |
| return fetch().then( | |
| function (success) { | |
| dispatch(requestWasSuccessful(success)); | |
| }, | |
| function (error) { | |
| dispatch(requestFailed(success)); |
Hi Nicholas,
I saw you tweet about JSX yesterday. It seemed like the discussion devolved pretty quickly but I wanted to share our experience over the last year. I understand your concerns. I've made similar remarks about JSX. When we started using it Planning Center, I lead the charge to write React without it. I don't imagine I'd have much to say that you haven't considered but, if it's helpful, here's a pattern that changed my opinion:
The idea that "React is the V in MVC" is disingenuous. It's a good pitch but, for many of us, it feels like in invitation to repeat our history of coupled views. In practice, React is the V and the C. Dan Abramov describes the division as Smart and Dumb Components. At our office, we call them stateless and container components (view-controllers if we're Flux). The idea is pretty simple: components can'
| https://www.destroyallsoftware.com/talks/wat | |
| https://youtu.be/-zRN7XLCRhc?t=33m00s | |
| https://vimeo.com/9471538 | |
| https://www.destroyallsoftware.com/talks/ | |
| https://news.ycombinator.com/item?id=4261851 | |
| https://www.youtube.com/watch?v=M_Wp-2XA9ZU | |
| https://www.youtube.com/watch?v=ji5_MqicxSo | |
| https://www.youtube.com/watch?v=UF8uR6Z6KLc | |
| https://www.youtube.com/watch?v=3tim1sjY7q8 | |
| https://www.youtube.com/watch?v=oTugjssqOT0 |
Create a repo. Make sure there is at least one file in it (even just the README) Generate ssh key:
ssh-keygen -t rsa -C "your_email@example.com"
Copy the contents of the file ~/.ssh/id_rsa.pub to your SSH keys in your GitHub account settings. Test SSH key:
ssh -T git@github.com
None of the string methods modify this – they always return fresh strings.
-
charAt(pos: number): stringES1Returns the character at index
pos, as a string (JavaScript does not have a datatype for characters).str[i]is equivalent tostr.charAt(i)and more concise (caveat: may not work on old engines).
| var parser = document.createElement('a'); | |
| parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
| parser.protocol; // => "http:" | |
| parser.hostname; // => "example.com" | |
| parser.port; // => "3000" | |
| parser.pathname; // => "/pathname/" | |
| parser.search; // => "?search=test" | |
| parser.hash; // => "#hash" | |
| parser.host; // => "example.com:3000" |
| // stateless/dumb component in React Typescript | |
| import * as React from 'react'; | |
| interface IWelcomeProps { | |
| name: string, | |
| } | |
| const Welcome: React.SFC<IWelcomeProps> = ({ name }) => { | |
| return <h1>Hello, {name}</h1>; | |
| } |