Skip to content

Instantly share code, notes, and snippets.

View fkobon's full-sized avatar

François-Xavier fkobon

View GitHub Profile
@fkobon
fkobon / update-urls.sql
Created September 5, 2022 11:22 — forked from ashhitch/update-urls.sql
Update your site URL in Wordpress to a new one. If you have changed your table prefix from wp_ the update the code below first.
/* update all post permalinks */
update wp_posts
set guid = REPLACE(guid, 'http://www.oldsite.com', 'http://www.newsite.com')
where guid LIKE '%http://www.oldsite.com%';
/* update all post content */
update wp_posts
SET post_content = REPLACE(post_content, 'http://www.oldsite.com', 'http://www.newsite.com')
where post_content LIKE '%http://www.oldsite.com%';
@fkobon
fkobon / postgres-brew.md
Created December 19, 2021 23:13 — forked from ibraheem4/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update

Keybase proof

I hereby claim:

  • I am fkobon on github.
  • I am fkobon (https://keybase.io/fkobon) on keybase.
  • I have a public key ASDRNh7Tc8JLflqwX4oRrZIr1EFkijmpl43mYeSIJZmYrwo

To claim this, I am signing this object:

@fkobon
fkobon / wp-file-permissions.md
Created August 31, 2019 21:22 — forked from lajlev/wp-file-permissions.md
Set Wordpress file permissions an FS method on localhost

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/
@fkobon
fkobon / How to use Images as Radio buttons.md
Created March 29, 2019 18:41 — forked from rcotrina94/How to use Images as Radio buttons.md
How to use images for radio buttons (input-radio).
@fkobon
fkobon / .gitignore
Created October 31, 2018 13:28 — forked from octocat/.gitignore
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@fkobon
fkobon / install-php7.2-mcrypt.sh
Created June 12, 2018 19:56 — forked from arzzen/install-php7.2-mcrypt.sh
Install PHP 7.2 MCrypt extension
## How to install mcrypt in php7.2
##
## https://lukasmestan.com/install-mcrypt-extension-in-php7-2/
##
#
# Check version php and pecl
#
php -v # if default php is not 7.2 then use /usr/bin/php7.2 instead php