Skip to content

Instantly share code, notes, and snippets.

View tuki0918's full-sized avatar
🏠
Working from home

Y.Yamamoto tuki0918

🏠
Working from home
View GitHub Profile
@mizchi
mizchi / how-to-use-react-suspense.md
Last active July 9, 2020 08:01
テストから読み解くReact Suspense の使い方

TL;DR

// Create Lazy Component
const LazyComponent = React.lazy(() => import('./SomeOtherComponent'));

ReactDOM.hydrate(
  <React.unstable_Suspense fallback="loading">
     <LazyComponent />
  </React.unstable_Suspense>
@hermanbanken
hermanbanken / Dockerfile
Last active April 15, 2025 21:49
Compiling NGINX module as dynamic module for use in docker
FROM nginx:alpine AS builder
# nginx:alpine contains NGINX_VERSION environment variable, like so:
# ENV NGINX_VERSION 1.15.0
# Our NCHAN version
ENV NCHAN_VERSION 1.1.15
# Download sources
RUN wget "http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz" -O nginx.tar.gz && \
@swalkinshaw
swalkinshaw / tutorial.md
Last active February 26, 2025 21:15
Designing a GraphQL API
@ksasao
ksasao / findmarker.py
Last active February 20, 2022 09:12
某スーツの水玉をみつけるやつ
import numpy as np
import random
import math
import cv2
from PIL import Image
def recognize(im):
# 輪郭線抽出のための二値化
im_gray = cv2.cvtColor(im, cv2.COLOR_BGR2GRAY)
im_blur = cv2.GaussianBlur(im_gray, (3, 3), 0)
@sebmarkbage
sebmarkbage / The Rules.md
Last active April 12, 2025 17:55
The Rules of React

The Rules of React

All libraries have subtle rules that you have to follow for them to work well. Often these are implied and undocumented rules that you have to learn as you go. This is an attempt to document the rules of React renders. Ideally a type system could enforce it.

What Functions Are "Pure"?

A number of methods in React are assumed to be "pure".

On classes that's the constructor, getDerivedStateFromProps, shouldComponentUpdate and render.

@dennisobrien
dennisobrien / Markdown.JavaScript.md.js
Created October 1, 2017 04:52
DataGrip extension to export results to markdown.
/*
* DataGrip extension to export results to markdown.
* The markdown table format is supported by Github and Jira. I haven't tested others.
*
* Tested on DataGrip 2016.2.2
* - Open the File view. View -> Tool Windows -> Files
* - Activate the "Scratches" tab. You should see "Files", "Scopes", and "Scratches".
* - Copy this file to Extensions/Database Tools and SQL/data/extractors/Markdown.JavaScript.md.js
* - Run a query with some results.
* - Change the export format to Markdown.JavaScript.md.js and click "To Clipboard".
@shunirr
shunirr / criminal_jc.md
Last active December 25, 2024 04:13
女子中学生チケット詐欺事件

criminal_jc

@tenkoma
tenkoma / .gitlab-ci.yml
Created May 20, 2017 13:47
GitLab CI + Review Apps, Apache, Digest Auth
variables:
REVIEW_DEPLOY_DIR: "/var/www/wildcard.example.com/$CI_PROJECT_NAME-$CI_BUILD_REF_SLUG"
# コピー元フォルダ(カスタマイズ可能)
SRC_PUBLIC_DIR: "htdocs"
# コピー先フォルダ(カスタマイズ不可)
DST_PUBLIC_DIR: "htdocs"
# HTTP認証ユーザー(カスタマイズ可能)
HTTP_USER: "user"
# HTTP認証パスワード(カスタマイズ可能)
HTTP_PASSWORD: "pass"
@teamdandelion
teamdandelion / labels_1024.tsv
Last active February 6, 2024 08:33
TensorBoard: TF Dev Summit Tutorial
We can make this file beautiful and searchable if this error is corrected: No tabs found in this TSV file in line 0.
7
2
1
0
4
1
4
9
5
9
@naotokui
naotokui / audio_lstm_keras.ipynb
Last active June 30, 2019 21:55
Audio generation with LSTM in keras
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.