Skip to content

Instantly share code, notes, and snippets.

View jaepetto's full-sized avatar

Emmanuel Jaep jaepetto

  • @epfl-ic-it
  • Lausanne
View GitHub Profile
@ahmadawais
ahmadawais / flywheel-local-xdebug-vscode.md
Last active May 3, 2024 12:07
Debug WordPress with Visual Studio Code | VSCode WordPress Debug Setup | WordPress xDebug Setup for Local by FlyWheel with VSCode | Part of the VSCode Learning Course → https://VSCode.pro

VSCode WordPress Debugging Setup: WordPress Xdebug Setup for Local by FlyWheel with VSCode


Consider supporting my work by purchasing the course this tutorial is a part of i.e. VSCode Power User

🚅 TL;DR

  • Make sure your Local by FlyWheel WordPress install is a custom install
@beugley
beugley / human_readable_to_bytes.py
Created August 24, 2016 17:51
Python function to convert a human-readable byte string (e.g. 2G, 10GB, 30MB, 20KB) to a number of bytes
def human_readable_to_bytes(size):
"""Given a human-readable byte string (e.g. 2G, 10GB, 30MB, 20KB),
return the number of bytes. Will return 0 if the argument has
unexpected form.
"""
if (size[-1] == 'B'):
size = size[:-1]
if (size.isdigit()):
bytes = int(size)
else: