Skip to content

Instantly share code, notes, and snippets.

@larrybotha
larrybotha / A.markdown
Last active August 29, 2015 14:07
Fix WordPress update issues on local Apache sites by updating Apache's User and Group

Fix WordPress Asking For FTP Credentials On Mac

Credit goes to Justin Kopepasah: Change Local Apache User on a Mac (Mavericks)

Apache permissions on Mac (Mavericks) prevents uploads on certain local environments, particularly updating of WordPress' core and plugins (WordPress will ask for FTP credentials).

To fix this, change Apache's default User and Group.

# /etc/apache2/httpd.conf
var distanceInput = document.getElementById("distance");
@larrybotha
larrybotha / A.markdown
Last active August 29, 2015 14:01
Nginx site specific configs.

Nginx Configs For Homebrew Install

A list of configs specific to different environments.

Found at /usr/local/etc/nginx/

@larrybotha
larrybotha / A.markdown
Last active April 2, 2024 14:37
Export multiple artboards in Adobe Illustrator to png, or pdf

Export multiple Adobe Illustrator artboards to png, jpg, pdf

This is a reference to Matthew Ericson's article Export Illustrator Layers and/or Artboards as PNGs and PDFs in case something happens to happen to the article, and if I just forget where to find the exporter online.

Usage

  • Drop MultiExporter.js into /Applications/Adobe\ Illustrator\ CS6/Presets.localized/en_GB/Scripts
  • Restart Illustrator
@larrybotha
larrybotha / A.markdown
Last active October 24, 2023 21:26
Merge wiki updates that are on a fork of your repo.

Merge Wiki Changes From A Forked Github Repo

This is inspired (or basically copied) from How To Merge Github Wiki Changes From One Repository To Another, by Roman Ivanov, and serves to ensure that should something happen to the original article, the information remains nice and safe here.

Terminology

OREPO: original repo - the repo created or maintained by the owner

FREPO: the forked repo that presumably has updates to its wiki, not yet on the OREPO

@larrybotha
larrybotha / A.markdown
Last active March 3, 2021 10:41
Custom social sharing icons
@larrybotha
larrybotha / A.markdown
Last active August 29, 2015 13:55
Beer Pong - Referee Version

Beer Pong - Referee!!!

This is a variation of beer pong that allows for as many players as a table can fit, and ends when you die.

The basic rules are simple. Add your own rules as you see fit.

The Players

There are 2 types of players in this version of beer pong.

@larrybotha
larrybotha / A.markdown
Last active February 7, 2024 15:20
Fix SVGs not scaling in IE9, IE10, and IE11

Fix SVG in <img> tags not scaling in IE9, IE10, IE11

IE9, IE10, and IE11 don't properly scale SVG files added with img tags when viewBox, width and height attributes are specified. View this codepen on the different browsers.

Image heights will not scale when the images are inside containers narrower than image widths. This can be resolved in 2 ways.

Use sed in bash to remove width and height attributes in SVG files

As per this answer on Stackoverflow, the issue can be resolved by removing just the width and height attributes.

@larrybotha
larrybotha / A.markdown
Last active April 14, 2018 14:15
Add your public SSH key to your server in one command

Add Your Public SSH Key To Your Server In One Command

You will need to create .ssh/authorized_keys if it is not yet on your server.

cat ~/.ssh/id_rsa.pub | ssh user@hostname 'cat >> .ssh/authorized_keys'

Generating Your Own Public Key