Reference
Remove sensitive files from Git/Github
In Terminal
git filter-branch --index-filter 'git rm --cached --ignore-unmatch [file path/name]' --prune-empty --tag-name-filter cat -- --all
Example:
| <?php | |
| /** | |
| * @package Creating Tables Boilerplate WordPress Plugin | |
| * @version 1.0 | |
| */ | |
| /* | |
| Plugin Name: Creating Tables Boilerplate WordPress Plugin | |
| Plugin URI: https://praison.com/ | |
| Description: Creating Tables Boilerplate WordPress Plugin | |
| Author: Mervin Praison |
| <?php | |
| // NOTE: THE CODE TO COPY/PASTE STARTS *BELOW* THIS LINE | |
| // Setting a custom timeout value for cURL. | |
| //Using a high value for priority to ensure the function runs after any other added to the same action hook. | |
| add_action('http_api_curl', 'sar_custom_curl_timeout', 9999, 1); | |
| function sar_custom_curl_timeout( $handle ){ | |
| curl_setopt( $handle, CURLOPT_CONNECTTIMEOUT, 30 ); // 30 seconds. Too much for production, only for testing. | |
| curl_setopt( $handle, CURLOPT_TIMEOUT, 30 ); // 30 seconds. Too much for production, only for testing. | |
| } |
| <?php | |
| /** | |
| * This little class records how long it takes each WordPress action or filter | |
| * to execute which gives a good indicator of what hooks are being slow. | |
| * You can then debug those hooks to see what hooked functions are causing problems. | |
| * | |
| * This class does NOT time the core WordPress code that is being run between hooks. | |
| * You could use similar code to this that doesn't have an end processor to do that. | |
| * |
Reference
Remove sensitive files from Git/Github
In Terminal
git filter-branch --index-filter 'git rm --cached --ignore-unmatch [file path/name]' --prune-empty --tag-name-filter cat -- --all
Example:
| module.exports = function(grunt) { | |
| grunt.initConfig({ | |
| cssmin: { | |
| target: { | |
| files: [{ | |
| expand: true, | |
| cwd: 'release/css', | |
| src: ['*.css', '!*.min.css'], | |
| dest: 'release/css', |
| module.exports = function(grunt) { | |
| grunt.initConfig({ | |
| cssmin: { | |
| options: { | |
| mergeIntoShorthands: false, | |
| roundingPrecision: -1 | |
| }, | |
| target: { |
| module.exports = function(grunt) { | |
| grunt.initConfig({ | |
| cssmin: { | |
| options: { | |
| mergeIntoShorthands: false, | |
| roundingPrecision: -1 | |
| }, | |
| target: { |
| jQuery(document).ready(function($) { | |
| jQuery('button.btn').click(function() { | |
| var submit_value = jQuery(this).attr("value"); | |
| var ajax_contact_form = "#ajax-contact-form-"+submit_value; | |
| jQuery(ajax_contact_form).submit(function(e){ | |
| var cat_name = jQuery("select#cat_name-"+submit_value+" option:selected").val(); |