Skip to content

Instantly share code, notes, and snippets.

Adam Culp adamculp

View GitHub Profile
@adamculp
adamculp / Bank.php
Last active November 20, 2018 15:28 — forked from jwage/Banks.php
Working example of PHP Doctrine 2 ManyToOne with corresponding OneToMany association.
<?php
declare(strict_types=1);
namespace Banks\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Branches\Entity\Branch;
@adamculp
adamculp / free-space-on-boot-disk.md
Created September 18, 2017 15:34 — forked from jbgo/free-space-on-boot-disk.md
Free up space on /boot disk (ubuntu)

Free disk space when /boot is full (Ubuntu)

TL;DR

dpkg -l linux-image*
uname -r
sudo apt-get remove linux-image-2.6.32-{21,37,38,39,40,41,42,43,44}-server
sudo apt-get autoremove
@adamculp
adamculp / readme.md
Created August 11, 2017 17:50 — forked from SammyK/readme.md
Northeast PHP Hack-a-thon notes

Northeast PHP Hack-a-thon (php-src) 2017

  • Set up GitHub account + add your SSH keys
  • Fork php-src repo to your GitHub account
  • Clone source (or use USB stick) & cd into directory
  • Update origin remote URL with your fork
$ git remote set-url origin {your-fork-URL}
@adamculp
adamculp / Dockerfile
Created August 11, 2017 17:50 — forked from SammyK/Dockerfile
Writing tests for php-src: Docker setup
FROM ubuntu:16.04
MAINTAINER Sammy Kaye Powers
RUN apt-get update \
&& apt-get install sudo vim git -y \
&& apt-get install build-essential autoconf valgrind -y \
&& apt-get install re2c bison -y \
&& apt-get install libxml2-dev locales lcov -y
@adamculp
adamculp / replace_php_short_tags.sh
Last active February 24, 2023 15:53 — forked from ma2thieu/replace_php_short_tags.sh
replace php short tags (<?) with long one (<?php)
#!/bin/bash
# purpose of these lines are to change short PHP tags to the full "<?php" style tag version
# PHP version 7+ has deprecated short tags
# first short PHP tags with something that is not a letter after
find . -iname "*.php" -print0 | xargs -0 -I{} sed -i -r 's/(<\?)([^a-zA-Z])/\1php\2/g' '{}'
# then find short PHP tags at end of line
find . -iname "*.php" -print0 | xargs -0 -I{} sed -i -r 's/<\?$/<\?php/g' '{}'