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
| ### Batch use (old) | |
| mirror from server | |
| <p>bash.exe ./lftp.exe sftp://user:password@site:port -e "set sftp:connect-program './ssh.exe'; mirror --verbose --use-pget-n=8 -c /remote/path /cygdrive/driveletter/folder; quit"</p> | |
| mirror to server | |
| <p> bash.exe ./lftp.exe sftp://user:password@site:port -e "set sftp:connect-program './ssh.exe'; mirror -R --verbose --use-pget-n=8 -c /cygdrive/driveletter/folder /remote/path; quit" </p> | |
| ### Nwgat LFTP Mirror Script (only SFTP for now) | |
| *Dont work with 4.6.2 or later atm |
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
| // Helpers. | |
| import { convertToText } from './'; | |
| /* | |
| You would call this when receiving a plain text | |
| value back from an API, and before inserting the | |
| text into the `contenteditable` area on a page. | |
| */ | |
| const convertToMarkup = (str = '') => { | |
| return convertToText(str).replace(/\n/g, '<br>'); |
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 data = { | |
| "name": "root", | |
| "contents": [ | |
| { | |
| "name": "A", | |
| "contents": [ | |
| { | |
| "name": "fileA1", | |
| "contents": [] | |
| } |
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 | |
| /* | |
| Plugin Name: WP Migrate DB Pro Tweaks | |
| Plugin URI: http://github.com/deliciousbrains/wp-migrate-db-pro-tweaks | |
| Description: Examples of using WP Migrate DB Pro's filters | |
| Author: Delicious Brains | |
| Version: 0.1 | |
| Author URI: http://deliciousbrains.com | |
| */ |
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
| # http://henrik.nyh.se/2008/12/git-dirty-prompt | |
| # http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/ | |
| # username@Machine ~/dev/dir [master]$ # clean working directory green | |
| # username@Machine ~/dev/dir [master*]$ # dirty working directory red* | |
| # | |
| function git_branch { | |
| git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/' | |
| } | |
| # http://unix.stackexchange.com/questions/88307/escape-sequences-with-echo-e-in-different-shells | |
| function markup_git_branch { |
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 | |
| /** | |
| * BITWISE FLAGS for Custom PHP Objects | |
| * | |
| * @link http://php.net/manual/en/language.operators.bitwise.php#108679 | |
| * | |
| * Sometimes I need a custom PHP Object that holds several boolean TRUE or FALSE values. | |
| * I could easily include a variable for each of them, but as always, code has a way to | |
| * get unweildy pretty fast. A more intelligent approach always seems to be the answer, |
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
| # ----------------------------------------------------------------- | |
| # Minimalistic .gitignore for WordPress | |
| # | |
| # To get this file rub bellow wget command from project root directory | |
| # wget -O .gitignore https://gist.github.com/indieforger/d915d8b430fef748f966/raw | |
| # | |
| # To ignore uncommitted changes in a file that is already tracked, | |
| # use `git update-index --assume-unchanged`. | |
| # | |
| # To stop tracking a file that is currently tracked, |
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 | |
| $I = new RedirectsTester($scenario); | |
| $I->wantTo('check 301 redirects are working'); | |
| // First, test /login/ page gets rewritten to https:// | |
| $I->seePermanentRedirectToHttpsFor('login/'); | |
| $I->seePermanentRedirectToHttpsFor('login/?redirect_to=foo'); |
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
Show hidden characters
| [ | |
| // | |
| // TABS (REGULAR) | |
| // | |
| // Tab set | |
| { | |
| "class": "tabset_control", | |
| "layer0.texture": "", |
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
| # ----------------------------------------------------------------- | |
| # .gitignore for WordPress @salcode | |
| # ver 20180808 | |
| # | |
| # From the root of your project run | |
| # curl -O https://gist.githubusercontent.com/salcode/b515f520d3f8207ecd04/raw/.gitignore | |
| # to download this file | |
| # | |
| # By default all files are ignored. You'll need to whitelist | |
| # any mu-plugins, plugins, or themes you want to include in the repo. |