Skip to content

Instantly share code, notes, and snippets.

View bgreenacre's full-sized avatar

Brian Greenacre bgreenacre

View GitHub Profile
@bgreenacre
bgreenacre / README.md
Last active March 27, 2023 15:52
For Your Party Backend Challenge

Products View Application

For Your Party Backend Code Challenge Specifications

Document Objective

The purpose of this document is to provide detailed documentation that clearly defines the application that an applicant will create for the For Your Party Code Challenge.

Scope of Work Details

@bgreenacre
bgreenacre / README.md
Last active March 27, 2023 13:29
For Your Party Code Challenge

Products View Application

For Your Party Code Challenge Specifications

Document Objective

The purpose of this document is to provide detailed documentation that clearly defines the application that an applicant will create for the For Your Party Code Challenge.

Scope of Work Details

@bgreenacre
bgreenacre / Object.assign.js
Created October 12, 2021 13:21
polyfill for object.assign
if (!Object.assign) {
Object.defineProperty(Object, 'assign', {
enumerable: false,
configurable: true,
writable: true,
value: function(target) {
'use strict';
if (target === undefined || target === null) {
throw new TypeError('Cannot convert first argument to object');
}
# download to `/var/tmp/ignorelist`
wget https://raw.githubusercontent.com/rubo77/rsync-homedir-excludes/master/rsync-homedir-excludes.txt -O /var/tmp/ignorelist
# or copy to `/var/tmp/ignorelist`
cp ./rsync-homedir-excludes.txt /var/tmp/ignorelist
# edit the file /var/tmp/ignorelist to your needs
nano /var/tmp/ignorelist
# define a Backup directory, for example:
BACKUPDIR=/media/$USER/linuxbackup/home/$USER/
@bgreenacre
bgreenacre / wp-gitify.sh
Last active December 26, 2015 15:38
This script syncs wordpress plugins and themes svn repositories to github git repositories using svn2git, git and the github api.
#!/bin/bash
##
# Name: wp-gitify
# Description: Turns the subversion repositories of wordpress
# plugins and themes into github read-only repositories.
# Author: Brian Greenacre <[email protected]>
# Requirements: git, svn, git-svn, svn2git, curl
##
@bgreenacre
bgreenacre / gist:6939760
Created October 11, 2013 18:34
A simple example of executing a background process with php.
<?php
exec(
sprintf(
'cd "%s" && %s "%s" install > "%s" 2>&1 & echo $! >> "%s"',
__DIR__,
'/usr/bin/php',
__DIR__ . '/bin/composer.phar',
__DIR__ . '/var/log/composer-' . date('dmY-His') . '.log',
__DIR__ . '/var/run/composer.pid'