Skip to content

Instantly share code, notes, and snippets.

Avatar
⚛️
Focusing

Yuji Matsumoto queq1890

⚛️
Focusing
View GitHub Profile
View createNewPullRequestWithMDX.ts
import { Octokit } from '@octokit/rest';
type Option = {
owner: string;
repo: string;
baseBranch: string;
newBranch: string;
fileName: string;
markDown: string;
pullRequest: {
@queq1890
queq1890 / main.ts
Last active Apr 27, 2022
Create a new pull request with empty commit using @octokit/rest
View main.ts
import { Octokit } from '@octokit/rest';
type Option = {
owner: string;
repo: string;
baseBranch: string;
newBranch: string;
pullRequest: {
title: string;
body: string;
@queq1890
queq1890 / DisplayFormikState.js
Created Nov 19, 2018
use this component inside of Formik rendering
View DisplayFormikState.js
import React from 'react';
const DisplayFormikState = props => {
const { values, errors, touched } = props;
return (
<div style={{ margin: '1rem 0' }}>
<h3 style={{ fontFamily: 'monospace' }} />
<pre
style={{
background: '#f6f8fa',
@queq1890
queq1890 / product_form.rb
Last active Aug 6, 2018
Building children models without using accepts_nested_attributes_for
View product_form.rb
class ProductForm
include ActiveModel::Model
include ActiveModel::Attributes
attr_accessor :images
attribute :deliverable_days, :integer
attribute :detail, :string
attribute :name, :string
attribute :price, :integer