Skip to content

Instantly share code, notes, and snippets.

View leogopal's full-sized avatar
🌍
Working on a better, free-er web.

Leo Gopal leogopal

🌍
Working on a better, free-er web.
View GitHub Profile
@DarraghB1992
DarraghB1992 / README.md
Last active January 31, 2024 23:23
Exporting Saved Replies from Intercom into a CSV file
@dainelmawer
dainelmawer / OS X Development Setup
Created September 25, 2017 07:29
Development Bash Script for MAC OS X using Homebrew
#!/usr/bin/env bash
#
# Notes:
#
# - Homebrew & Git require Xcode Command Line Tools, OS X should prompt you on first install.
#
echo "Starting Mac OS X Dev Setup..."
# Check for Homebrew, install if we don't have it
#/bin/bash
cd _seed
FILENAME=$(find . -maxdepth 1 -name [a-zA-Z0-9]*-migrate-[0-9]*.sql.gz)
gunzip ${FILENAME} -c > temp.sql
read -p "New Domain Name e.g. http://example.com: " replacement
cat temp.sql | sed -e "s@##DEV_URL##@${replacement}@g" > temp2.sql
cat temp2.sql | sed -e "s@##DEV_PATH##@${replacement}@g" > new_db.sql
@leogopal
leogopal / no-jquery.md
Last active November 11, 2016 10:54
Going without jQuery (when possible) Resources
@MikeNGarrett
MikeNGarrett / wp-cli-install-rec-plugins
Last active July 12, 2021 07:18
Chained WordPress CLI commands to install and activate recommended plugins.
# wordpress-seo provides ability to edit meta information and provides sitemap.
# w3-total-cache provides advanced caching no matter the server technology available.
# better-wp-security provides brute force protection and a number of WordPress enhancements.
# google-analytics-for-wordpress provides robust Google Analytics integration through the Google API.
# redirection detects 404s and 301s and allows admins to set up redirects in the WP admin.
# ewww-image-optimizer provides automatic optimization of uploaded images with local libraries instead of cloud-based services.
# backupwordpress simple backup solution that can store backups above web root.
# relevanssi provides better site search using a local index.
# cloudflare is the best. Free automatic CDN and security solution.
# jarvis is a quick search for the WordPress admin. Indespensible.
#For files
sudo find . -type f -exec chmod 664 {} +
#For Directories
sudo find . -type d -exec chmod 775 {} +
#For the Config File
sudo chmod 660 wp-config.php

Meteor Alternatives Per Feature

This table was created in 2015 so may be quite outdated today.

Feature Meteor Solution Alternative Solutions Description
Live DB Sync [livequery][lq] ([mongo-oplog]), [ddp] RethinkDB, Redis, ShareDB, [npm:mongo-oplog], [firebase], etc. Push DB updates to client/server.
Latency Compensation, Optimistic UI [minimongo][mm] [RethinkDB][lcr], [mWater/minimongo] (fork, not ws but http, browserify) Imitate successful db query on client before it is done.
Isomorphic Code [isobuild] & isopacks browserify Write one code for server/client/mobile.
Isomorphic Packaging [isobuild], atmosphere No more separate packages for server & client. Get bower + npm + mobile.
@richlloydmiles
richlloydmiles / gist:675a76f176b2beb1cacc
Last active February 29, 2016 08:09
WordPress Ajax
add_action('wp_head','pluginname_ajaxurl');
function pluginname_ajaxurl() {
?>
<script type="text/javascript">
var ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>';
</script>
<?php
}
//functions.php code
@AlphaBlossom
AlphaBlossom / woocommerce-move-price.php
Last active May 6, 2020 15:30
Move WooCommerce Pricing on Single Product Page
/**********************************
*
* Move WooCommerce Price on Single Product Page
*
* @author AlphaBlossom / Tony Eppright
* @link http://www.alphablossom.com
*
* Reference hook locations using woocommerce_single_product_summary hook
*
* @hooked woocommerce_template_single_title – 5
@norcross
norcross / calc-read-time.php
Created July 3, 2014 02:51
calculate and display an estimated reading time
<?php
/**
* handle the calculation
* @param integer $seconds [description]
* @return [type] [description]
*/
function rkv_calc_read_time( $seconds = 0 ) {
// calc the minutes