Skip to content

Instantly share code, notes, and snippets.

@nmnp
nmnp / opcache_reset.php
Created July 3, 2018 23:09
reset opcache
<?php
opcache_reset();
@nmnp
nmnp / composer-config.md
Last active March 8, 2022 11:08
Could not authenticate against github.com composer error

Could not authenticate against github.com

This could be related to GitHub rate limits being reached. Specify your GitHub API token to avoid it.

For example by the following command:

composer config --global github-oauth.github.com <TOKEN> or inside your composer.json file:

@nmnp
nmnp / export.sh
Created January 1, 2020 22:55
set environment variables from .env file
#GNU systems
export $(grep -v '^#' .env | xargs -d '\n')
# BSD systems
export $(grep -v '^#' .env | xargs -0)
#link
https://stackoverflow.com/questions/19331497/set-environment-variables-from-file-of-key-value-pairs