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
| class ItemViewComponent extends React.Component { | |
| render() { | |
| return ( <View> {this.displayJsxMessage()} </View> ); | |
| } | |
| displayJsxMessage() { | |
| return {this.props.isGreeting && <Text> Hello, JSX! </Text>} | |
| } | |
| } |
| PARENT | |
| func = (smh) => { | |
| alert(smh) | |
| } | |
| <ChildComponent func={this.func} /> | |
| CHILD | |
| pressHandler(smh) { |
| In web design sometimes you need an «empty» pixel to scale it to the desired length. For this matter I have gathered GIF and PNG both 100% transparent and white (it turns out this has some impact on the file size). | |
| The PNGs have been ran through PNGOutWin. JPEGs I could get were above 1 KiB and for this reason are not considered. | |
| Get all images in this archive. | |
| Details | |
| GIF | |
| The winner is 1-color GIF – 35 bytes. Data URI for white 1×1 image: |
| $('[id]').each(function(){ | |
| var ids = $('[id="'+this.id+'"]'); | |
| if(ids.length>1 && ids[0]==this) | |
| console.warn('Multiple IDs #'+this.id); | |
| }); |
| git rm -r --cached . | |
| git add . | |
| git commit -am 'git cache cleared' | |
| git push |
| <?php | |
| // in the loop | |
| $category = get_the_category(); | |
| $currentcat = $category[0]->cat_ID; | |
| $currentcatname = $category[0]->cat_name; | |
| $currentcatslug = $category[0]->slug; | |
| // outside the loop | |
| global $post; | |
| $categories = get_the_category($post->ID); |
| add_filter( 'woocommerce_checkout_fields' , 'custom_remove_woo_checkout_fields' ); | |
| function custom_remove_woo_checkout_fields( $fields ) { | |
| // remove billing fields | |
| unset($fields['billing']['billing_first_name']); | |
| unset($fields['billing']['billing_last_name']); | |
| unset($fields['billing']['billing_company']); | |
| unset($fields['billing']['billing_address_1']); | |
| unset($fields['billing']['billing_address_2']); |
| # remove specific file from git cache | |
| git rm --cached filename | |
| # remove all files from git cache | |
| git rm -r --cached . | |
| git add . | |
| git commit -m ".gitignore is now working" |
| curl -H "Accept-Encoding: gzip" -I https://blababalabla.com/js/homePage.js |