Skip to content

Instantly share code, notes, and snippets.

Avatar
😷

Constance Okoghenun okoghenun

😷
View GitHub Profile
View 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')
@okoghenun
okoghenun / SassMeister-input.scss
Created Aug 7, 2018
Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// libsass (v3.5.4)
// ----
%emoji-menu-toggle-button {
line-height: 1;
padding: 0;
min-width: 16px;
color: gray;
fill: gray;
@okoghenun
okoghenun / SassMeister-input.scss
Created Aug 7, 2018
Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// libsass (v3.5.4)
// ----
@mixin emoji-menu-toggle-button {
line-height: 1;
padding: 0;
min-width: 16px;
color: gray;
fill: gray;
View public⁄index.html
<!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/
-->
View src⁄App.js
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>
@okoghenun
okoghenun / CacheClient.js
Last active Jan 30, 2018
Redis style API wrapper around localforage as a cache mechanism
View CacheClient.js
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
};
@okoghenun
okoghenun / routeTransformer.js
Created Aug 17, 2017
Warps around Express middleware to ensure compatibility with Rill
View routeTransformer.js
'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) => {
You can’t perform that action at this time.