Skip to content

Instantly share code, notes, and snippets.

@kheuser
kheuser / ubuntu2002_php559.sh
Last active May 22, 2024 20:16
Install php5.5.9 on Ubuntu 20.04
apt -y install build-essential libxml2-dev libxslt1-dev
apt -y install libfcgi-dev libfcgi0ldbl libjpeg62-dbg libxml2-dev
apt -y install libmcrypt-dev libssl-dev libc-client2007e libc-client2007e-dev
apt -y install libbz2-dev libcurl4-openssl-dev libjpeg-dev
apt -y install libfreetype6-dev libkrb5-dev libpq-dev libicu-dev
ln -s /usr/lib/libc-client.a /usr/lib/x86_64-linux-gnu/libc-client.a
mkdir /opt/php-5.5.9
mkdir /usr/local/src/php5-build
@kheuser
kheuser / AlternateColor.jsx
Last active May 23, 2023 16:14
Alternate colors on mapped React components
const componentName = () => {
const alternatingColor = ['#FCE389', '#F38181'];
return array.map((item, index) => (
<SubComponent style={{color: alternatingColor[index % alternatingColor.length]}} />
)
}