Skip to content

Instantly share code, notes, and snippets.

View queq1890's full-sized avatar
⚛️
Focusing

Yuji Matsumoto queq1890

⚛️
Focusing
View GitHub Profile
@queq1890
queq1890 / main.ts
Last active May 27, 2023 01:55
Create a new pull request with empty commit using @octokit/rest
import { Octokit } from '@octokit/rest';
type Option = {
owner: string;
repo: string;
baseBranch: string;
newBranch: string;
pullRequest: {
title: string;
body: string;
import { Octokit } from '@octokit/rest';
type Option = {
owner: string;
repo: string;
baseBranch: string;
newBranch: string;
fileName: string;
markDown: string;
pullRequest: {
@queq1890
queq1890 / DisplayFormikState.js
Created November 19, 2018 10:49
use this component inside of Formik rendering
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 August 6, 2018 05:28
Building children models without using accepts_nested_attributes_for
class ProductForm
include ActiveModel::Model
include ActiveModel::Attributes
attr_accessor :images
attribute :deliverable_days, :integer
attribute :detail, :string
attribute :name, :string
attribute :price, :integer