Skip to content

Instantly share code, notes, and snippets.

View remarkablemark's full-sized avatar

Mark remarkablemark

View GitHub Profile
brew tap shivammathur/php
brew install shivammathur/php/php@7.4
brew link --force --overwrite php@7.4
brew services start php@7.4
echo 'export PATH="/opt/homebrew/opt/php@7.4/bin:$PATH"' >> ~/.zshrc # or ~/.bashrc
echo 'export PATH="/opt/homebrew/opt/php@7.4/sbin:$PATH"' >> ~/.zshrc # or ~/.bashrc
@remarkablemark
remarkablemark / order-of-growth-classifications.md
Last active July 17, 2023 12:44
Common order-of-growth classifications

Common order-of-growth classifications

order of growth name code example description example T(2N) / T(N)
1 constant a = b + c statement add 3 numbers 1
log N logarithmic while (N > 1)
{ n = N / 2; }
divide in half binary search ~ 1
N linear for (i = 0; i < N; i++)
{ /* ... */ }
loop find the maximum 2
N log N linearithmic
@remarkablemark
remarkablemark / vim-prettier-vundle.md
Created March 19, 2018 15:03
How to install vim-prettier with Vim Vundle

vim-prettier

Open vimrc:

vim ~/.vim/vimrc

Add Vundle plugin to vimrc:

Plugin 'prettier/vim-prettier'
@remarkablemark
remarkablemark / AmountTest.php
Created February 25, 2023 21:26
PHPUnit example test
<?php
declare(strict_types=1);
namespace App\Tests\Catalog\Value;
use App\Catalog\Value\Amount;
use PHPUnit\Framework\TestCase;
final class AmountTest extends TestCase
@remarkablemark
remarkablemark / .dockerignore
Last active January 24, 2023 23:20
Docker Node.js Example
node_modules/
*.log
Created and wrote to ~/.netrc
Successfully logged into heroku
› Warning: Our terms of service have changed:
Added git remote heroku
› https://dashboard.heroku.com/terms-of-service
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Building on the Heroku-20 stack
remote: -----> Node.js app detected
Run git push heroku master
git push heroku master
shell: /usr/bin/bash -e {0}
remote:
remote: ! Push rejected, source repository is a shallow clone. Unshallow it with `git fetch --all --unshallow` and try pushing again.
remote:
To https://git.heroku.com/***.git
! [remote rejected] master -> master (shallow update not allowed)
error: failed to push some refs to 'https://git.heroku.com/***.git'
Error: Process completed with exit code 1.
jobs:
custom-deploy:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Heroku login credentials
run: |
jobs:
heroku-deploy:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Deploy to Heroku
uses: akhileshns/heroku-deploy@v3.12.12
with:
heroku_api_key: ${{ secrets.HEROKU_API_KEY }}