Skip to content

Instantly share code, notes, and snippets.

View hitaboy's full-sized avatar
🎯
Focusing

Pere Esteve hitaboy

🎯
Focusing
View GitHub Profile
/* ---------------------------------------------------------- */
/* */
/* A media query that captures: */
/* */
/* - Retina iOS devices */
/* - Retina Macs running Safari */
/* - High DPI Windows PCs running IE 8 and above */
/* - Low DPI Windows PCs running IE, zoomed in */
/* - Low DPI Windows PCs and Macs running Firefox, zoomed in */
/* - Android hdpi devices and above */

Set Wordpress file permissions and FS method on localhost

On Mac OS X (Leopard), the Apache HTTP Server runs under the user account, _www which belongs to the group _www. To allow WordPress to configure wp-config.php during installation, update files during upgrades, and update the .htaccess file for pretty permalinks, give the server write permission on the files.

One way to do this is to change the owner of the wordpress directory and its contents to _www. Keep the group as staff, a group to which your user account belongs and give write permissions to the group.

Step 1

$ cd //Sites/
@hitaboy
hitaboy / wp.sh
Last active February 7, 2016 16:56 — forked from bgallagh3r/wp.sh
Wordpress: Bash Install Script -- Downloads latest WP version, updates wp-config with user supplied DB name, username and password, creates and CHMOD's uploads dir, copies all the files into the root dir you run the script from, then deletes itself!
#!/bin/bash -e
clear
echo "============================================"
echo "WordPress Install Script"
echo "============================================"
echo "Database Name: "
read -e dbname
echo "Database User: "
read -e dbuser
echo "Database Password: "
@hitaboy
hitaboy / docker_cleaning.md
Last active September 14, 2018 20:56
Docker containers cleaning

You find it stopped

docker ps -a

You can simply start it using below command:

docker start webserver

EDIT: Alternatives If you want to start the container with below command each time,

cd ~/Library/Application\ Support/TorBrowser-Data/Tor
vim torrc

git config --global credential.helper osxkeychain

cordova run ios --buildFlag='-UseModernBuildSystem=0'
As dpogue pointed out, cordova fixed this issue with the commit
92a62997adb3c8512328d5a0ae42fe5d156291f1
which is in the master branch of their iOS platform repository.
To benefit from this fix, you'll have to install the latest dev version like this
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
#How to remove your SSH public/private keys, recreate them, and then add your newly created public key to the servers and online services you use.
#Remove your SSH public/private keys:
rm ~/.ssh/id_rsa*
#Recreate the keypair, choosing a new passphrase:
ssh-keygen -t rsa -f ~/.ssh/id_rsa
#Add the newly created private key to your OS X Keychain to store the passphrase and manage unlocking it automatically:
ssh-add -K ~/.ssh/id_rsa
I installed mkcert:
brew install mkcert
brew install nss # if you use Firefox
mkcert -install
Then, in your project directory:
mkcert 0.0.0.0 localhost 127.0.0.1 ::1