This file contains hidden or 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
| git branch -m old_branch new_branch # Rename branch locally | |
| git push origin :old_branch # Delete the old branch | |
| git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
This file contains hidden or 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 | |
| /* | |
| Register Fonts | |
| */ | |
| function studio_fonts_url() { | |
| $font_url = ''; | |
| /* | |
| Translators: If there are characters in your language that are not supported | |
| by chosen font(s), translate this to 'off'. Do not translate into your own language. |
This file contains hidden or 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
| [^\w]_[_|e]\( |
This file contains hidden or 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 | |
| __ | |
| _e | |
| _ex | |
| esc_attr__ | |
| esc_attr_e | |
| esc_attr_x | |
| esc_html__ | |
| esc_html_e | |
| esc_html_x |
This file contains hidden or 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
| var workflow = wp.media({ | |
| title: 'Select the images', | |
| // use multiple: false to disable multiple selection | |
| multiple: 'add', | |
| button: { | |
| text: 'Add selected images' | |
| }, | |
| library: { | |
| type: 'image' | |
| } |
This file contains hidden or 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
| /*jslint undef: false, browser: true, devel: false, eqeqeq: false, bitwise: false, white: false, plusplus: false, regexp: false, nomen: false */ | |
| /*global wp,jQuery */ | |
| jQuery(document).ready(function($) { | |
| if (!window.wp || !window.wp.media) { | |
| return; | |
| } | |
| var media = window.wp.media; |
This file contains hidden or 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
| (function ($) { | |
| "use strict"; | |
| /*global wp,jQuery */ | |
| var CustomGalleryEdit,CustomFrame; | |
| function customClasses() { | |
| var media = wp.media; | |
| var l10n = media.view.l10n; | |
This file contains hidden or 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
| // case insensetive | |
| function countLetterFrequency(str) { | |
| var a = str.toLowerCase().split('').sort(), | |
| o = {}, | |
| char = []; | |
| while(a.length) { | |
| char = a.slice(0, a.lastIndexOf( a[0] ) + 1 ); | |
| o[char[0]] = char.length; | |
| a = a.slice( a.lastIndexOf( a[0] ) + 1 ); |
This file contains hidden or 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
| #!/bin/bash | |
| hostName=$1 | |
| echo "$hostName creation procedure starts" | |
| # create directory at /var/www/ | |
| sudo mkdir /var/www/$hostName | |
| # goto apache dirctory | |
| cd /etc/apache2/sites-available |