This file contains 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains 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
defaults write com.apple.dock persistent-apps -array-add '{"tile-type"="spacer-tile";}' | |
killall Dock |
This file contains 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains 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
ul { | |
/* one item */ | |
li:first-child:nth-last-child(1) { | |
width: 100%; | |
} | |
/* two items */ | |
li:first-child:nth-last-child(2), li:first-child:nth-last-child(2) ~ li { | |
width: 50%; |
This file contains 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
ln -s /Applications/MAMP/tmp/mysql/mysql.sock /tmp/mysql.sock |
This file contains 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
SET FOREIGN_KEY_CHECKS = 0; | |
TRUNCATE TABLE `catalog_category_anc_products_index_idx`; | |
TRUNCATE TABLE `catalog_category_anc_products_index_tmp`; | |
TRUNCATE TABLE `catalog_category_product`; | |
TRUNCATE TABLE `catalog_category_product_cat_cl`; | |
TRUNCATE TABLE `catalog_category_product_index`; | |
TRUNCATE TABLE `catalog_category_product_index_cl`; | |
TRUNCATE TABLE `catalog_category_product_index_enbl_idx`; | |
TRUNCATE TABLE `catalog_category_product_index_enbl_tmp`; | |
TRUNCATE TABLE `catalog_category_product_index_idx`; |
This file contains 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
<style> | |
label { | |
margin:20px 0; | |
position:relative; | |
display:inline-block; | |
span { | |
padding:10px; | |
pointer-events: none; | |
position:absolute; |
This file contains 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 values = ["Red","Green","Blue"]; | |
var unique = values.filter(filterunique); | |
jQuery.each(unique, function(index,value) { | |
if(!jQuery('input[value="'+value+'"]').length) { | |
jQuery('#add_new_option_button').click(); | |
jQuery('#manage-options-panel table tbody tr:last-child .required-option').val(value); | |
} | |
}); |