Skip to content

Instantly share code, notes, and snippets.

View yoshiki-0428's full-sized avatar
🏠
Working from home

Yoshiki yoshiki-0428

🏠
Working from home
View GitHub Profile
@babldev
babldev / README.md
Last active December 29, 2023 20:54
NextJS Background Task

NextJS Background Task Example

An example of how to add a background task (e.g. a queue consumer) to an existing NextJS project.

Setup

  • Add your background task file
  • Add a new worker-tsconfig.json, specifically specifying "module": "commonjs" and targeting only the worker source files.
  • Add convenience functions for building & running to package.json

Then to build once:

@pgilad
pgilad / AggregateControllerTest.java
Created February 17, 2019 19:12
An example on how to use WebFluxTest to test a Spring Boot WebFlux Controller
package com.blazemeter.dagger.domains.aggregate;
import com.blazemeter.dagger.domains.aggregate.port.AggregateRepository;
import com.blazemeter.dagger.domains.common.CollectionService;
import org.apache.commons.lang3.RandomUtils;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.ArgumentMatchers;
import org.mockito.Mockito;
import org.springframework.beans.factory.annotation.Autowired;
@coccoinomane
coccoinomane / google-forms-public-images.js
Last active January 13, 2024 10:00
Make images submitted via a Google Form publicly viewable.
/**
* Make images submitted via a Google Form publicly viewable.
*
* Updated version at https://gist.github.com/bef1b29628be234978f6d286f4e719ba
*
* INSTRUCTIONS
*
* 1. Open the response spreadsheet.
* 2. Open the script editor (Tools -> Script Editor), paste the content of this
* file inside the editor, and save (Ctrl+S or Cmd+S).
@cognitom
cognitom / download.js
Last active January 7, 2023 07:34
openBDの全データを整形しつつ単一ファイルにダウンロード
import {join} from 'path'
import {createWriteStream} from 'fs'
import request from 'request'
import {parse, stringify} from 'JSONStream'
import find from 'lodash.get'
import highland from 'highland'
const apiRoot = 'https://api.openbd.jp/v1'
const cwd = process.cwd()
const distFile = join(cwd, 'all.json')
@j5ik2o
j5ik2o / gist:2970973
Last active April 12, 2024 07:19
ペアプロの心得

ペアプロの心得

休憩をとる

1.定期的に休憩をとっていますか? ペアプログラミングは、精神的な体力を消耗します。定期的に休憩をとってリフレッシュすることがとても大切です。

謙虚になる

2.「色々な実装方針がある」という認識がありますか?

@tdd
tdd / gitconfig.ini
Last active April 17, 2024 10:04
Nice, useful global Git configuration
# Put this in your ~/.gitconfig or ~/.config/git/config
# Windows users: "~" is your profile's home directory, e.g. C:\Users\<YourName>
[user]
name = Your Full Name
email = your@email.tld
[color]
# Enable colors in color-supporting terminals
ui = auto
[alias]
# List available aliases