Skip to content

Instantly share code, notes, and snippets.

View steelydylan's full-sized avatar
🎯
Focusing

Hori Godai steelydylan

🎯
Focusing
View GitHub Profile
import { Hono } from 'hono'
import React, { Suspense } from 'react'
import { renderToReadableStream } from 'react-dom/server'
import { suspend } from 'suspend-react'
const app = new Hono()
function Component() {
const data = suspend(async () => {
const res = await fetch('https://jsonplaceholder.typicode.com/todos')
@justin-carver
justin-carver / training.jsonl
Created October 22, 2022 10:40
GPT-3 Fine-Tuning SaaS Name Training Data
{"prompt": "Generate a unique SaaS Name and description: ->", "completion": " SaaS Name: Pukket, Description: Social Media Management App focused on Local SMBs.\n###"}
{"prompt": "Generate a unique SaaS Name and description: ->", "completion": " SaaS Name: Stock AI, Description: Get Stock Images Generated by AI + In-built blogpost image generator.\n###"}
{"prompt": "Generate a unique SaaS Name and description: ->", "completion": " SaaS Name: Rewardful, Description: Build Your own affiliate program to scale your business.\n###"}
{"prompt": "Generate a unique SaaS Name and description: ->", "completion": " SaaS Name: PageFlow, Description: Storytelling Tool to generate content in English & German.\n###"}
{"prompt": "Generate a unique SaaS Name and description: ->", "completion": " SaaS Name: Arcade Software, Description: To create Interactive Product Demos for Landing Pages.\n###"}
{"prompt": "Generate a unique SaaS Name and description: ->", "completion": " SaaS Name: Lanva.io, Description: Turn Your Long form
import ts, { factory } from "typescript";
export function transformerFactory(context: ts.TransformationContext) {
function visitNode(node: ts.Node): ts.Node {
const newNode = ts.visitEachChild(node, visitNode, context);
if (
ts.isJsxOpeningElement(newNode) ||
ts.isJsxSelfClosingElement(newNode)
) {
return appendSourceMapAttribute(newNode.getSourceFile(), newNode);
@kenmori
kenmori / TypeScriptPractice.md
Last active May 7, 2024 08:28
TypeScript 練習問題集
@steelydylan
steelydylan / Hook.php
Created May 15, 2019 01:22
ブログレベルを表示するグローバル変数の生成サンプル
<?php
namespace Acms\Custom;
use DB;
use SQL;
use ACMS_Filter;
/**
* ユーザー定義のHookを設定します。
*/
@phpbits
phpbits / full-codes.js
Last active July 1, 2022 11:32
Extend core Gutenberg blocks with custom attributes and settings. View full tutorials here : https://jeffreycarandang.com/extending-gutenberg-core-blocks-with-custom-attributes-and-controls/
/**
* External Dependencies
*/
import classnames from 'classnames';
/**
* WordPress Dependencies
*/
const { __ } = wp.i18n;
const { addFilter } = wp.hooks;
@mizchi
mizchi / predict-frontend.md
Last active May 12, 2023 03:43
React のユーザーから見た今後のフロントエンドの予想

この記事は議論のたたき台で、ポジショントークや、偏見にまみれています。

今のフロントエンドの分類

  • 古典的なサーバーサイド WAF への +α の味付け
  • 大規模なクライアントアプリケーション管理のための SPA
  • SEO / SSR を考慮した Node ヘヴィーな環境

他、提唱されてるパターン

@kitze
kitze / conditionalwrap.js
Created October 25, 2017 16:54
one-line React component for conditionally wrapping children
import React from 'react';
const ConditionalWrap = ({condition, wrap, children}) => condition ? wrap(children) : children;
const Header = ({shouldLinkToHome}) => (
<div>
<ConditionalWrap
condition={shouldLinkToHome}
wrap={children => <a href="/">{children}</a>}
>
@dianjuar
dianjuar / Install update WordPress puglins directly.md
Last active April 16, 2024 12:21
Install update WordPress plugins without providing ftp access

Install WordPress plugins directly (without FTP)

Put this on your wp-config.php

/* That's all, stop editing! Happy blogging. */
define('FS_METHOD', 'direct');
@tyxla
tyxla / insert-widget-in-sidebar.php
Created August 24, 2016 10:43
Insert a widget in a sidebar programmatically in WordPress
<?php
/**
* Insert a widget in a sidebar.
*
* @param string $widget_id ID of the widget (search, recent-posts, etc.)
* @param array $widget_data Widget settings.
* @param string $sidebar ID of the sidebar.
*/
function insert_widget_in_sidebar( $widget_id, $widget_data, $sidebar ) {