A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.
One-line version to paste in your DevTools
Use $$ if your browser aliases it:
~ 108 byte version
| #delete all the remote tags with the pattern your looking for, ie. DEV- | |
| git tag | grep <pattern> | xargs -n 1 -i% git push origin :refs/tags/% | |
| #delete all your local tags | |
| git tag | xargs -n 1 -i% git tag -d % | |
| #fetch the remote tags which still remain | |
| git fetch |
| {% capture html %} | |
| <html> | |
| ... | |
| </html> | |
| {% endcapture %}{{ html | strip_newlines | replace:' ','' | replace:' ','' | replace:' ',' ' }} |
| // Determine if an element is in the visible viewport | |
| function isInViewport(element) { | |
| var rect = element.getBoundingClientRect(); | |
| var html = document.documentElement; | |
| return ( | |
| rect.top >= 0 && | |
| rect.left >= 0 && | |
| rect.bottom <= (window.innerHeight || html.clientHeight) && | |
| rect.right <= (window.innerWidth || html.clientWidth) | |
| ); |
| git branch -m old_branch new_branch # Rename branch locally | |
| git push origin :old_branch # Delete the old branch | |
| git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
| (function (root, factory) { | |
| if ( typeof define === 'function' && define.amd ) { | |
| define([], factory(root)); | |
| } else if ( typeof exports === 'object' ) { | |
| module.exports = factory(root); | |
| } else { | |
| root.myPlugin = factory(root); | |
| } | |
| })(typeof global !== "undefined" ? global : this.window || this.global, function (root) { |
| // Reference: http://www.blackdogfoundry.com/blog/moving-repository-from-bitbucket-to-github/ | |
| // See also: http://www.paulund.co.uk/change-url-of-git-repository | |
| $ cd $HOME/Code/repo-directory | |
| $ git remote rename origin bitbucket | |
| $ git remote add origin https://github.com/mandiwise/awesome-new-repo.git | |
| $ git push origin master | |
| $ git remote rm bitbucket |
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 led 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't
| Lesson 1 - Iterations | |
| - BinaryGap - https://codility.com/demo/results/trainingU2FQPQ-7Y4/ | |
| Lesson 2 - Arrays | |
| - OddOccurrencesInArray - https://codility.com/demo/results/trainingFN5RVT-XQ4/ | |
| - CyclicRotation - https://codility.com/demo/results/trainingSH2W5R-RP5/ | |
| Lesson 3 - Time Complexity | |
| - FrogJmp - https://codility.com/demo/results/training6KKWUD-BXJ/ | |
| - PermMissingElem - https://codility.com/demo/results/training58W4YJ-VHA/ |
My objective is to have some production files ignored on specific branches. Git doesn't allow to do it.
My solution is to make a general .gitignore file and add .gitignore.branch_name files for the branches I want to add specific file exclusion.
I'll use post-checkout hook to copy those .gitignore.branch_name in place of .git/info/exclude each time I go to the branch with git checkout branch_name.