Skip to content

Instantly share code, notes, and snippets.

View kerihenare's full-sized avatar

Keri Henare kerihenare

View GitHub Profile
export default const Wrapper = props => props.children;
@kerihenare
kerihenare / docker-compose.yml
Created July 4, 2017 16:57
Example wordpress on docker.
version: '3'
services:
wordpress:
depends_on:
- db
image: wordpress:latest
volumes:
- $PWD:/var/www/html/wp-content
@kerihenare
kerihenare / docker-compose.yml
Last active February 18, 2022 21:50
Quick MAMP docker example
version: '2'
services:
web:
image: php:apache
restart: unless-stopped
volumes:
- $PWD:/var/www
ports:
- 80:80
@kerihenare
kerihenare / how-to-scope.js
Last active August 29, 2015 14:24
How to Scope
/**
* Reference "this"
*/
var self = this;
self.someOtherMethod = function (result) {
var self = this;
return new Promise(function (resolve, reject) {
self.callbackMethod(result, function (error, result) {
@kerihenare
kerihenare / keybase.md
Created July 13, 2014 23:34
Keybase prood

Keybase proof

I hereby claim:

  • I am kerihenare on github.
  • I am kerihenare (https://keybase.io/kerihenare) on keybase.
  • I have a public key whose fingerprint is 8A6C 28F6 7328 234D E2F2 D865 F50F B84C 1083 8D75

To claim this, I am signing this object:

<?php
/**
*
* @param string $moreLinkText
* @param integer $stripteaser
*/
function the_content_readmore($moreLinkText = null, $stripteaser = 0)
{
$content = apply_filters('the_content', get_the_content($moreLinkText, $stripteaser));
@kerihenare
kerihenare / AcceptHeadersRequestTest.php
Created September 27, 2012 02:44
Symfony 2.0 HttpFoundation Request::splitHttpAcceptHeader test
<?php
namespace Symfony\Tests\Component\HttpFoundation;
use Symfony\Component\HttpFoundation\Request;
class SplitHttpAcceptHeaderTest extends \PHPUnit_Framework_TestCase
{
public function testHttpAcceptHeaders()
var arrayToString = function(items) {
var lastItem = items.pop();
return items.join(', ') + ' and ' + lastItem;
};
@kerihenare
kerihenare / gist:1182189
Created August 30, 2011 21:55
Example proxy pac file for local development environment
var tests = [
'*.local',
'*.local.nz',
'*.local.au',
'*.fws'
],
direct = 'DIRECT',
proxy = 'PROXY webserver:80';
var FindProxyForURL = function (url, host) {
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Example</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script>
// http://www.selfcontained.us/2009/09/16/getting-keycode-values-in-javascript/
keycode = {
getKeyCode : function(e) {