Skip to content

Instantly share code, notes, and snippets.

View mariadanieldeepak's full-sized avatar

Maria Daniel Deepak mariadanieldeepak

View GitHub Profile
@mariadanieldeepak
mariadanieldeepak / custom-list.php
Last active September 15, 2016 16:09
Replace default Bulk Actions option name by overriding bulk_action method of WP_List_Table
protected function bulk_actions( $which ) {
if( $which == 'top' || 'bottom' == $which ) {
?>
<div class="alignleft actions bulkactions">
<label class="screen-reader-text" for="bulk-action-selector-top">Select bulk action</label>
<select id="bulk-action-selector-top" name="action">
<option value="-1">Default option</option>
<option value="1">Option 1</option>
<option value="2">Option 2</option>
</select>
@mariadanieldeepak
mariadanieldeepak / Linux machine architecture
Last active September 15, 2016 15:54
Run the command in the Terminal to find machine architecture
uname -m
@mariadanieldeepak
mariadanieldeepak / Download Sublime Text 32-bit
Created September 15, 2016 16:07
Run the command to download Sublime Text 3 - 32-bit version
wget http://c758482.r82.cf2.rackcdn.com/sublime-text_build-3083_i386.deb
@mariadanieldeepak
mariadanieldeepak / Download Sublime Text 64-bit
Last active September 15, 2016 16:19
Run the command to download Sublime Text 3 - 64-bit version
wget http://c758482.r82.cf2.rackcdn.com/sublime-text_build-3083_amd64.deb
@mariadanieldeepak
mariadanieldeepak / Install Sublime Text 3
Created September 15, 2016 16:32
Install Sublime Text 3 using the downloaded .deb file
sudo apt install sublime-text_bulid-3083_amd64.deb
@mariadanieldeepak
mariadanieldeepak / Navigate to Downloads directory
Created September 15, 2016 16:35
Navigate to Downloads directory to install the downloaded file.
cd ~/Downloads
@mariadanieldeepak
mariadanieldeepak / index.html
Created January 27, 2017 08:52
01: Add/remove multiple attributes using jQuery
UserName <br />
<input type="text" id="username" name="username" class="multiple-attr-remove" />
<br /><br />
UserEmail <br />
<input type="text" class="multiple-attr-add" />
@mariadanieldeepak
mariadanieldeepak / script.js
Last active January 27, 2017 08:58
02: Add/remove multiple attributes using jQuery
$( document ).ready(function() {
// Remove multiple attributes
$( 'input.multiple-attr-remove' ).removeAttr( 'id name' );
// Add multiple attributes
$( 'input.multiple-attr-add' ).attr( {'id': 'useremail', 'name': 'useremail' } );
});
@mariadanieldeepak
mariadanieldeepak / install-mysql-on-mac-os-using-homebrew.sh
Last active April 6, 2017 05:24
Install MySQL on Mac OS Using Homebrew
# Check for Brew related problems
mariadanieldeepak@Marias-MacBook-Pro ~ $ brew doctor
# Update Homebrew and all new forumulae
mariadanieldeepak@Marias-MacBook-Pro ~ $ brew update
# Install MySQL
mariadanieldeepak@Marias-MacBook-Pro ~ $ brew install mysql
# Secure MySQL installation
@mariadanieldeepak
mariadanieldeepak / remove-optins.js
Last active April 25, 2017 18:01
Remove all Optins from WordPress posts
$( document ).ready(function() {
$( document ).on("OptinMonsterBeforeShow", function(a, b, c) {
// Remove all optins whose ID begins with 'om-'
$( "[id^='om-']" ).remove();
});
});