Skip to content

Instantly share code, notes, and snippets.

View daydream05's full-sized avatar

Vince P. daydream05

View GitHub Profile
@coreyward
coreyward / gatsby-node.js
Created January 29, 2021 15:54
Generating a Netlify Redirects file from redirect-directives created in Sanity.io
exports.onPostBuild = ({ graphql }) =>
graphql(`
{
redirects: allSanityRedirect {
nodes {
matchPath
target
statusCode
}
}
@coreyward
coreyward / SomePageComponent.jsx
Created September 15, 2020 18:26
Extending Gatsby GraphQL schema with interfaces to query shared fields across multiple similar types
import React from "react"
import { graphql } from "gatsby"
const Page = props => <pre>{JSON.stringify(props, null, 2)}</pre>
export default Page
export const query = graphql`
{
sanityPage {
@rojcyk
rojcyk / blogpost.jsx
Last active July 16, 2021 14:14
Blog outpout styling
import React from 'react'
import RehypeReact from 'rehype-react'
/* Importing styled or react components */
import {
Headline1,
} from './content'
/* Mapping the components to the markdown output */
@aksonov
aksonov / rnrf.md
Last active July 30, 2022 22:39
Proposal for lightning talk at ReactiveConf 2017: What is RNRF (react-native-router-flux)?

What is RNRF (react-native-router-flux)?

React Native is great product but lacks for stable, intuitive and easy navigation API during many years. Every year we see new, better API: Native Navigator, ex-Navigator, NavigationExperimental, ex-Navigation, wix native navigation, airbnb native navigation, ReactNavigation...

Once I've started React Native development, in 2015, I created RNRF - simple API for easy navigation. It was clear that better navigation instruments will come later but I didn't want to change my code again and again to switch for better API. Every new major version of RNRF is based on different navigation framework and mostly preserves own API.

Another goal was to represent all navigation flow within one place in clear, human-readable way - similar to iOS Storyboards concept. This way other engineers could understand your app flow faster.

@suryart
suryart / application.html.erb
Last active October 26, 2023 00:16
Rails 4 flash messages using Twitter Bootstrap(bootstrap-sass: https://github.com/thomas-mcdonald/bootstrap-sass). An improved version of https://gist.github.com/roberto/3344628
// layout file
<body>
<div class="container">
<%= flash_messages %>
<%= yield %>
</div><!-- /container -->
</body>