View remove.attribute.js
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
let docClient = new AWS.DynamoDB.DocumentClient(); | |
let params = { | |
TableName : "customer", | |
Key : { | |
"customerId": "customer_001" | |
}, | |
UpdateExpression : "REMOVE address.street3", | |
ReturnValues : "UPDATED_NEW" | |
}; |
View 0_reuse_code.js
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 |
View angular.js
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
if(!$scope.$$phase) { | |
// $digest or $apply; | |
$scope.$apply(); | |
} |
View add_meta.php
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
<?php | |
add_action('woocommerce_product_options_pricing', 'atlantean_coming_soon'); | |
function atlantean_coming_soon() { | |
woocommerce_wp_checkbox( array( | |
'id' => '_coming_soon', | |
'wrapper_class' => 'show_if_simple show_if_variable', | |
'label' => __( 'Coming soon', 'woocommerce' ), | |
'description' => __( 'Enable coming soon label', 'woocommerce' ) |
View start_chrome_desctop.sh
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
Mostly from https://aur.archlinux.org/packages/chrome-remote-desktop/?comments=all but with some of my changes. | |
1. I manually created the chrome-remote-desktop group, and added myself to it. | |
2. I manually created the ~/.chrome-remote-desktop-session file with "exec startxfce4" in it. | |
3. I manually created the ~/.config/chrome-remote-desktop directory. | |
4. mkdir /etc/chromium-browser/native-messaging-hosts | |
4. ln -s /etc/opt/chrome/native-messaging-hosts/* /etc/chromium-browser/native-messaging-hosts/ | |
You should now have a 'Enable Remote Connection' button on the CRD extension page. |
View find_rm.sh
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
postdrop: warning: mail_queue_enter: create file maildrop/327454.25698: No space left on device | |
find dir_name/ -type f -name "*" -exec rm -f {} \; - #wery slow for many files | |
find session/ -type f -delete; #will perform better because it doesn't have to spawn an external process for each and every matched file. |
View gulp_install.sh
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
# Install latest node | |
# for Node.js v4 | |
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash - | |
# OR for Node.js v5 | |
curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash - | |
# OR for Node.js v6 | |
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - | |
sudo apt-get install nodejs | |
# it will install npm to |
View wc-sort-by-default.php
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
<?php | |
/** | |
* This code should be added to functions.php of your theme | |
**/ | |
add_filter('woocommerce_default_catalog_orderby', 'imperialfashion_custom_default_catalog_orderby'); | |
function imperialfashion_custom_default_catalog_orderby() { | |
return 'date'; // Can also use title and price | |
} |
View msttcorefonts
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
sudo apt install msttcorefonts | |
sudo fc-cache -fv |
View pupkey
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
gpg --keyserver pgpkeys.mit.edu --recv-key 010908312D230C5F | |
gpg -a --export 010908312D230C5F | sudo apt-key add - |
NewerOlder