Skip to content

Instantly share code, notes, and snippets.

Avatar

Billie Thompson PurpleBooth

View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am purplebooth on github.
  • I am billie (https://keybase.io/billie) on keybase.
  • I have a public key whose fingerprint is 5B35 0719 EC0D AE98 C93D 57FA D5D5 0C93 78BF CAB0

To claim this, I am signing this object:

View gist:496632b8a6acf756033e
$total = ($origCount * $origRating) + $rating;
$number = $origCount + $count;
if ($number > 0) {
$origRating = $total / $number;
$origCount = $number;
return [$origRating, $origCount];
} else {
$origRating = 0;
$origCount = 0;
return [$origRating, $origCount];
View gist:8230b36fe8424b5a89a3
[PHP]
;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.
; PHP attempts to find and load this configuration from a number of locations.
; The following is a summary of its search order:
View gist:2a03e16da68df7877c24
$ php composer.phar require vendor/package1:dev-master
$ php composer.phar require --dev vendor/package2:~1.1.0
View gist:a9703afce896c63bf527
### Keybase proof
I hereby claim:
* I am purplebooth on github.
* I am billie (https://keybase.io/billie) on keybase.
* I have a public key whose fingerprint is 5B35 0719 EC0D AE98 C93D 57FA D5D5 0C93 78BF CAB0
To claim this, I am signing this object:
View keybase.md

Keybase proof

I hereby claim:

  • I am purplebooth on github.
  • I am billie (https://keybase.io/billie) on keybase.
  • I have a public key whose fingerprint is 5B35 0719 EC0D AE98 C93D 57FA D5D5 0C93 78BF CAB0

To claim this, I am signing this object:

View gist:f1c33cc83ab0dd4eaacc
<?php
if(count($argv) != 2) {
echo "Attempt to recursively convert a directory of XML files to UTF-8 and Fix any unescaped & symbols\n";
echo "Usage {$argv[0]} directory\n";
exit(1);
}
$path = realpath($argv[1]);
View gist:30c599c8824106e863e5
#!/bin/bash
cd /to/a/directory
# make comments
run -what --you=would type.on -the commandline
VARIABLES_ARE_A_THING="youcanuse"
# sometimes you want conditionals
@PurpleBooth
PurpleBooth / README-Template.md
Last active Mar 3, 2021
A template to make good README.md
View README-Template.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites