Skip to content

Instantly share code, notes, and snippets.

View ericmdev's full-sized avatar

Eric Mugerwa ericmdev

  • Manchester, United Kingdom
View GitHub Profile
@ericmdev
ericmdev / penguin.php
Last active November 28, 2015 03:25
PHP penguin class.
class penguin
{
}

Quick install PHP 7.0:

1. Install depends PHP 7.0
$ brew install autoconf automake gmp bison27 gd freetype t1lib gettext zlib mcrypt
2. Configure PHP 7.0
$ git clone --depth=1 https://github.com/php/php-src.git

$ cd php-src

@ericmdev
ericmdev / application.html.erb
Created December 12, 2015 04:38 — forked from garethrees/application.html.erb
Boilerplate HTML <head> Section
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<!-- Make a DNS handshake with a foreign domain, so the connection goes faster when the user eventually needs to access it. This works well for loading in assets (like images) from another domain, or a JavaScript library from a CDN. -->
<link rel="dns-prefetch" href="//ajax.googleapis.com" />
<link rel="dns-prefetch" href="//s3.amazonaws.com" />
<!-- Make sure the latest version of IE is used -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
@ericmdev
ericmdev / mac_install_ansible.sh
Last active December 23, 2015 19:03
Install Ansible on Mac OS X El Capitan via Pip.
#!/bin/sh
sudo easy_install pip
sudo pip install ansible
@ericmdev
ericmdev / ansible_install_requirements.sh
Last active December 23, 2015 20:42
Install Ansible playbook requirements via Ansible Galaxy.
#!/bin/sh
# We use `--ignore-errors` on rerun to skip existing roles.
ansible-galaxy install -r $(PWD)/requirements.yml -p $(PWD)/roles/ --ignore-errors
@ericmdev
ericmdev / gsm_test.sh
Created December 24, 2015 16:55
Test git submodule for gsm (Git Submodule Manager - https://github.com/ericmdev/gsm)
#!/bin/sh
echo 'You successfully added this git submodule to your project using gsm (Git Submodule Manager)'
@ericmdev
ericmdev / readme.md
Created December 26, 2015 19:03 — forked from coolaj86/how-to-publish-to-npm.md
How to publish packages to NPM

Getting Started with NPM (as a developer)

If you haven't already set your NPM author info, now you should:

npm set init.author.name "Your Name"
npm set init.author.email "you@example.com"
npm set init.author.url "http://yourblog.com"

npm adduser

@ericmdev
ericmdev / .gitconfig
Created December 28, 2015 16:53 — forked from pksunkara/config
Sample of git config file (Example .gitconfig)
[user]
name = Pavan Kumar Sunkara
email = pavan.sss1991@gmail.com
[core]
editor = vim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
excludesfile = ~/.gitignore
[sendemail]
smtpencryption = tls
smtpserver = smtp.gmail.com
@ericmdev
ericmdev / docker-remove-all.sh
Last active October 20, 2021 09:15 — forked from JeffBelback/docker-destroy-all.sh
Docker - stop and remove all containers and images.
#!/bin/bash
# Stop all containers.
docker stop $(docker ps -a -q)
# Delete all containers.
docker rm $(docker ps -a -q)
# Delete all images.
docker rmi --force $(docker images -q)
@ericmdev
ericmdev / 1_phpunit-api.md
Created January 10, 2016 13:50 — forked from loonies/1_phpunit-api.md
PHPUnit Cheat Sheet

PHPUnit API reference

  • version 3.6

TODO

Check those constraints:

$this-&gt;anything()