Skip to content

Instantly share code, notes, and snippets.

View angellicadearaujo's full-sized avatar
🏠
Working from home

Angéllica de Araujo angellicadearaujo

🏠
Working from home
View GitHub Profile
@wi7a1ian
wi7a1ian / oop-design-patterns.md
Last active February 1, 2024 18:06
Design patterns in object-oriented programming

Any fool can write code that a computer can understand. Good programmers write code that humans can understand. - Martin Fowler

Legend:

  • 🔌 promotes decoupled architecture
  • 🎓 synergy with SOLID principles (ocp, srp, dip...)
  • ▶️ runtime focused (i.e: promotes reconfiguration)
  • 🛠 compiletime focused
  • 📝 configurable once (during initialization, usually from a config file)
  • 🆕 creational pattern
  • ⛓ structural pattern
@haircut
haircut / Install PIP to user site on macOS.md
Created August 29, 2017 21:50
How to install and use pip without sudo or admin on macOS

Install and use pip on macOS without sudo / admin access

Most recently tested on macOS Sierra (10.12.6)

  1. Download the installation script; curl https://bootstrap.pypa.io/get-pip.py -o ~/Downloads/get-pip.py
  2. Run the installation, appending the --user flag; python ~/Downloads/get-pip.py --user. pip will be installed to ~/Library/Python/2.7/bin/pip
  3. Make sure ~/Library/Python/2.7/bin is in your $PATH. For bash users, edit the PATH= line in ~/.bashrc to append the local Python path; ie. PATH=$PATH:~/Library/Python/2.7/bin. Apply the changes, source ~/.bashrc.
  4. Use pip! Remember to append --user when installing modules; ie. pip install <package_name> --user

Note

@aaronbloomfield
aaronbloomfield / multiple-php-versions-on-ubuntu-16.04.md
Last active July 9, 2020 01:53
Running multiple PHP versions on Apache2 and Ubuntu 16.04

Setting up multiple apache2 instances on Ubuntu 16.04

PHP handling on apache is done via modules of one sort or another, and running multiple version is problematic on a single instance. The solution is to run two instances of apache on the same machine. This allows one instance to run PHP 7 (the default on 16.04), and another can run PHP 5. Since normal http/https is on ports 80 and 443, the second instance will run on ports 81 and 444. Since it is running on the same machine, all file system and database access is the exact same.

All the commands herein have to be run as root, or with sudo prefixed to the command.

  1. Read /usr/share/doc/apache2/README.multiple-instances

  2. Run sh ./setup-instance php5 from /usr/share/doc/apache2/examples, where php5 is the suffix for the second site; all commands for the second site will have that suffix. This will keep all of the same configuration for all sites on the new instance, including SSL certif

@frankV
frankV / .dockerignore
Created December 22, 2015 06:06
Dockerfile for an Ionic Framework Project
Dockerfile
config.xml
.sass-cache
.editorconfig
.io-config.json
.dockerignore
hooks/
platforms/
node_modules/