Skip to content

Instantly share code, notes, and snippets.


Prasidhda Malla prasidhda

View GitHub Profile

1. Step to step to eject to ExpoKit by right way:

Step 1. Run command: expo eject in root of expo project.

Step 2. Choose 2nd option: Eject to ExpoKit and follow step to step from Expo command to eject it completely.

Step 3 (Optional) Install dependencies (normally, Expo will auto run this command)

yarn install
prasidhda / common spam words 2020
Last active Jun 28, 2020
List of common spam words
View common spam words 2020
0% risk
100% more
100% free
prasidhda /
Created Jun 22, 2020 — forked from tzmartin/
Embedded File Viewer: Google Drive, OneDrive

Office Web Apps Viewer

('.ppt' '.pptx' '.doc', '.docx', '.xls', '.xlsx')[OFFICE_FILE_URL]

<iframe src='[OFFICE_FILE_URL]' width='px' height='px' frameborder='0'>

OneDrive Embed Links

View GIT zip without ignored files, folders
If you're trying to zip up a project which is stored in Git, use the git archive command. From within the source directory:
git archive -o HEAD
You can use any commit or tag ID instead of HEAD to archive the project at a certain point.
If you want to add a prefix (e.g., a top level folder) to every file:
git archive -o --prefix=bitvolution/ HEAD
You can also adjust the compression level between 0 (no compression) and 9 (maximum compression) inclusive, for example
git archive -o -9 HEAD
For other options, see the help page (git help archive).
View Solving access denied error
ssh-add -K ~/.ssh/[your-private-key]
And in ~/.ssh/config you add:
Host *
UseKeychain yes
AddKeysToAgent yes
IdentityFile ~/.ssh/[your-private-key]
View Assign separate user roles to super admin and other user to new network site
add_action('wpmu_new_blog', 'wpmudev_new_blog_role', 300, 2);
function wpmudev_new_blog_role( $blog_id, $user_id ) {
//Switch to new network site
switch_to_blog( $blog_id );
//Set default fallback user role
$default_user_role = 'administrator'; // Will be used as fallback user role, will be used if WP somehow can't create user role programitically
//Create free user role
prasidhda / remove-cross-sell-products.php
Last active Nov 27, 2019
Remove cross sell products as well when removing the main product in woo commerce
View remove-cross-sell-products.php
add_action( 'woocommerce_cart_item_removed', function ( $cart_item, $cart ) {
$product_id_cart_item_pairs = WC()->session->get( 'product_id_cart_item_pairs', array() );
$cart_item_product_pairs = WC()->session->get( 'cart_item_product_pairs', array() );
// Get the product ID using session store
$product_id = isset( $product_id_cart_item_pairs[ $cart_item ] ) ? $product_id_cart_item_pairs[ $cart_item ] : false;
if ( ! $product_id ) {