This file contains 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 | |
git push --set-upstream origin new_branch | |
git push origin :old_branch |
This file contains 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
// Run in the Terminal | |
----------------------------------------------- | |
$ openssl genrsa -out mysite.dev.key 2048 | |
$ openssl req -new -key mysite.dev.key -out mysite.dev.csr | |
----------------------------------------------- | |
Answer questions after this last command | |
Then: | |
Create a mysite.dev.ext | |
And copy the following. |
This file contains 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
cd /Users/lucy/Library/Android/sdk | |
tools/emulator -avd Nexus_5X_API_23 -writable-system& | |
prepare file /tmp/hosts with contents: | |
127.0.0.1 localhost | |
::1 ip6-localhost | |
192.168.50.4 politico.test | |
Then execute: |
This file contains 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
watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && yarn cache clean && yarn install && yarn start -- --reset-cache |
This file contains 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
const toUnicode = (str) => { | |
let unicodeString = ''; | |
for (var i = 0; i < str.length; i ++) { | |
let unicodeStr = str.charCodeAt(i).toString(16).toUpperCase(); | |
while (unicodeStr.length < 4) { | |
unicodeStr = `0${unicodeStr}`; | |
} |
This file contains 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
/** | |
* URL normalization, make sure HTML entities are escaped. | |
* | |
* @param String url | |
* | |
* @return String | |
*/ | |
export function normalizeURL(url) { | |
const fixedEncodeURIComponent = str => encodeURIComponent(str).replace(/[!'()*]/g, x => `%${x.charCodeAt(0).toString(16)}`); |
This file contains 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
// Install Extension https://marketplace.visualstudio.com/items?itemName=felixfbecker.php-debug | |
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Listen for XDebug", | |
"type": "php", | |
"request": "launch", | |
"port": 9000, | |
"pathMappings": { |
This file contains 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
Theme | |
https://marketplace.visualstudio.com/items?itemName=wesbos.theme-cobalt2 | |
GitLens | |
https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens | |
Git History | |
https://marketplace.visualstudio.com/items?itemName=donjayamanne.githistory | |
PHP Debug |
This file contains 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 | |
// $this->_default_secure_auth_key defined in case SECURE_AUTH_KEY is not defined. | |
/** | |
* Encrypt code using OpenSSL | |
* | |
* @param string $code The code to encrypt. | |
*/ | |
public function encrypt_code( $code ) { | |
if ( empty( $code ) ) { |
This file contains 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
https://github.com/10up/wp-local-docker-v2 | |
Create new environment. | |
Edit docker-compose.yml | |
- set phpfpm image: 'liukaitj/php52' | |
- comment line | |
# - './config/php-fpm/docker-php-ext-xdebug.ini:/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini' | |
Run 10updocker stop | |
Run 10updocker start |