Skip to content

Instantly share code, notes, and snippets.

View matthewshirley's full-sized avatar
🍩

Matt Shirley matthewshirley

🍩
  • North Vancouver
View GitHub Profile
### Keybase proof
I hereby claim:
* I am matthewshirley on github.
* I am matthewshirley (https://keybase.io/matthewshirley) on keybase.
* I have a public key whose fingerprint is 21F4 4B72 4671 20B6 9BE8 6182 09DC B978 174B 3F8B
To claim this, I am signing this object:
@matthewshirley
matthewshirley / conftest.py
Created March 30, 2021 23:06
pytest post-setup hook for unittest
@pytest.hookimpl(hookwrapper=True)
def pytest_runtest_call(item):
instance = item._obj
self = instance.__self__
if getattr(self, 'post_setup', False):
def setUpWithHooks():
self.originalSetUp()
self.post_setup()
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { Route, Redirect, withRouter } from 'react-router-dom';
const AuthRoute = ({ component: Component, isLoggedIn, ...rest }) => (
<Route
{...rest}
render={props => (isLoggedIn === true ? <Component {...props} /> : <Redirect to={{ pathname: '/auth/login' }} />)}
@matthewshirley
matthewshirley / MainActivity.java
Last active June 6, 2017 23:54
React Native Navigation - Android Installation
package com.yourpackagename; // Make sure to change this to your package
import com.reactnativenavigation.controllers.SplashActivity;
public class MainActivity extends SplashActivity {
}
@matthewshirley
matthewshirley / memcached-notes.sh
Last active August 26, 2015 23:13
PHP Memcached - How to compile on Centos 6
# Download libmemcache 1.0.16: https://launchpad.net/libmemcached/1.0/1.0.16
```bash
./configure
make
make install
```
# Install memcached by pecl. When prompted for the directory type 'no -disable-memcached-sasl'
@matthewshirley
matthewshirley / LICENSE.txt
Created June 4, 2011 13:18 — forked from 140bytes/LICENSE.txt
140byt.es -- Click ↑↑ fork ↑↑ to play!
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE