git clone <repo>
clone the repository specified by ; this is similar to "checkout" in some other version control systems such as Subversion and CVS
Add colors to your ~/.gitconfig file:
| // It is important to declare your variables. | |
| (function() { | |
| var foo = 'Hello, world!'; | |
| print(foo); //=> Hello, world! | |
| })(); | |
| // Because if you don't, the become global variables. | |
| (function() { |
| // find all elements with a z-index and indicate what they are. | |
| // uses css outline which is not supported in IE <8 | |
| function contrast(color){ return '#' + | |
| (Number('0x'+color.substr(1)).toString(10) > 0xffffff/2 ? '000000' : 'ffffff'); | |
| } | |
| jQuery('*') | |
| .filter(function(){ return $(this).css('zIndex') !== 'auto'; }) | |
| .each(function(){ |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Box Shadow</title> | |
| <style> | |
| .box { | |
| height: 150px; | |
| width: 300px; | |
| margin: 20px; |
| 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 |
Because pointers can be ugh
To understand a pointer, let's review "regular" variables first. If you're familiar with a programming language without pointers like JavaScript, this is what you think when you hear "variable".
When declaring a variable by identifier (or name), the variable is synonymous with its value.
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent| import { FieldProps } from 'formik' | |
| import React from 'react' | |
| import Select, { Option, ReactSelectProps } from 'react-select' | |
| export const SelectField: React.SFC<ReactSelectProps & FieldProps> = ({ | |
| options, | |
| field, | |
| form, | |
| }) => ( | |
| <Select |