Skip to content

Instantly share code, notes, and snippets.

View okoghenun's full-sized avatar
😷

Constance Okoghenun okoghenun

😷
View GitHub Profile
@okoghenun
okoghenun / routeTransformer.js
Created August 17, 2017 13:51
Warps around Express middleware to ensure compatibility with Rill
'use strict';
/**
* Wraps the Express middlweares handlers to work with the Rill framework
* It ensures all Express HTTP verbs work and also routes call their
* middlewares with the interface (req, res, next) instead of (ctx, next)
* which is native to Rill.
* @param _app
*/
const routeTransformer = (_app) => {
@okoghenun
okoghenun / CacheClient.js
Last active January 30, 2018 19:27
Redis style API wrapper around localforage as a cache mechanism
import storage from 'localforage';
/**
* Redis style API wrapper around localforage as a cache mechanism
*/
export default class CacheClient {
constructor(config) {
defaultConfig = {
cacheDuration: 600, // 1o mins
};
import React, { Component } from 'react';
import { Switch, Route } from 'react-router-dom';
import { Routes } from './config/routes';
import './App.css';
class App extends Component {
render() {
return (
<section>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="#000000">
<!--
manifest.json provides metadata used when your web app is added to the
homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/
-->
@okoghenun
okoghenun / SassMeister-input.scss
Created August 7, 2018 08:34
Generated by SassMeister.com.
// ----
// libsass (v3.5.4)
// ----
@mixin emoji-menu-toggle-button {
line-height: 1;
padding: 0;
min-width: 16px;
color: gray;
fill: gray;
@okoghenun
okoghenun / SassMeister-input.scss
Created August 7, 2018 08:36
Generated by SassMeister.com.
// ----
// libsass (v3.5.4)
// ----
%emoji-menu-toggle-button {
line-height: 1;
padding: 0;
min-width: 16px;
color: gray;
fill: gray;
@okoghenun
okoghenun / capybara cheat sheet
Created August 8, 2018 04:50 — forked from zhengjia/capybara cheat sheet
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')