投稿時間:2022-11-05 23:15:51 RSSフィード2022-11-05 23:00 分まとめ(19件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
python Pythonタグが付けられた新着投稿 - Qiita [python] 簡単にJSON形式でファイルの使用記録を残す https://qiita.com/junzai/items/0827bca664a91ccb15ab windowspyt 2022-11-05 22:55:57
python Pythonタグが付けられた新着投稿 - Qiita Pythonのbool値で躓いた話 https://qiita.com/vulpa/items/b0443aa2028a599b1d2e search 2022-11-05 22:45:56
AWS AWSタグが付けられた新着投稿 - Qiita VMware Cloud on AWSでFSx for NetApp ONTAPを外部ストレージとして利用する際にハマりがちな箇所 https://qiita.com/mtoyoda/items/cd6f524faa56e3a2d2dd fsxfornetappontap 2022-11-05 22:42:42
AWS AWSタグが付けられた新着投稿 - Qiita Windows から AWS Amplify で Android アプリの作成体験 2 https://qiita.com/baku2san/items/8f3771c4af5de9dced6f eeabee 2022-11-05 22:26:26
Docker dockerタグが付けられた新着投稿 - Qiita 【Laravel6 × Docker】bootstrapを導入するとき、npm run devでエラーが出た https://qiita.com/tatsuro-itabashi/items/2111fc044943bfdbd3a5 bootstrap 2022-11-05 22:43:48
Docker dockerタグが付けられた新着投稿 - Qiita Dockerのコマンド https://qiita.com/shimanuki-yu/items/1f87f8bb17e9ea13a30d dockerのコマンドコマンド 2022-11-05 22:23:59
海外TECH Ars Technica 10 years of FTL: The making of an enduring spaceship simulator https://arstechnica.com/?p=1895421 creation 2022-11-05 13:00:47
海外TECH MakeUseOf 8 Ways Selfies Are Bad for Your Self-Esteem https://www.makeuseof.com/selfies-bad-for-self-esteem/ health 2022-11-05 13:16:14
海外TECH DEV Community Functions in JavaScript. https://dev.to/jindalkeshav82/functions-in-javascript-87n Functions in JavaScript IntroductionFunction is a block of code which perform specific task in a better and efficient way SyntaxIt is defined using function keyword then followed by the name of the function say var followed with parentheses Function name follows same rules as of variable name function var par par code to be executed Uses of FunctionsFunctions basically resist the repetition of same code again and again Once the code is designed we can use it multiple times just by giving the arguments Example function add num num const addition num num console log addition add add Output Function ReturnWhen return keyword is used in Function and it reaches to return statement the code will stop executing Return keyword helps in future use of the output of Function For example function multi par par return par par console log multi 2022-11-05 13:37:46
海外TECH DEV Community creating a self signed ssl certificate and making your browser trust it https://dev.to/cvltyxd/creating-a-self-signed-ssl-certificate-and-making-your-browser-trust-it-2blo creating a self signed ssl certificate and making your browser trust itSo i needed to make localhost with ssl certificate but couldn t find a way to create a certificate After a few hours i found the solution So first of all openssl genrsa out rootCA key openssl req x new nodes key rootCA key sha days out rootCA pemAfter those commands you should get files rootCA key amp rootCA pem Now let s create a bash script I ll name it create certificate for domain shto begin type this lines if z then echo Please supply a subdomain to create a certificate for echo e g mysite localhost exit fiif f device key then KEY OPT key else KEY OPT keyout fiDOMAIN COMMON NAME SUBJECT C CA ST None L NB O None CN COMMON NAME NUM OF DAYS cat v ext sed s DOMAIN COMMON NAME g gt tmp v extopenssl x req in device csr CA rootCA pem CAkey rootCA key CAcreateserial out device crt days NUM OF DAYS sha extfile tmp v extmv device csr DOMAIN csrcp device crt DOMAIN crtrm f device crt create csr file openssl req new newkey rsa sha nodes KEY OPT device key subj SUBJECT out device csr now we have to create a support file with settings I ll call it v extauthorityKeyIdentifier keyid issuerbasicConstraints CA FALSEkeyUsage digitalSignature nonRepudiation keyEncipherment dataEnciphermentsubjectAltName alt names alt names DNS DOMAIN DNS DOMAIN Now run the script create certificate for domain sh mysite localhost We get files mysite localhost crt amp amp device key We have to link them to our localhost nginx example open our link in browser you should get security error go into keychain and trust our mysite localhost crt open the browser again and open localhost That s it you should be good to go 2022-11-05 13:18:13
海外TECH DEV Community Testing with Prisma https://dev.to/moekidev/testing-with-prisma-3eo8 Testing with PrismaI have recently been experimenting with full stack app development using next js and prisma By the way take a look at the prisma documentation Integration testing with PrismaOne way to simulate a real world environment is to use Docker to encapsulate a database and some test data This can be spun up and torn down with the tests and so operate as an isolated environment away from your production databases This guide assumes you have Docker and Docker Compose installed on your machine as well as Jest setup in your project I see what you re saying but Do you want to prepare that much for testing I want to run tests more easily and nimbly And this is important because the documentation does not tell us how to clean up the database easily for each test case which makes the tests independent and changes their behavior depending on the order of the tests So let s do it In this case we have prepared the following schema datasource db provider postgresql url env DB URL generator client provider prisma client js model User id Int id default autoincrement email String unique name String npx prisma generateFirst we can use Dotenv to specify the URL of the database for testing npm i D dotenv env testDB URL postgresql user password example testNext we will define the test process Here let s use the pre and post functions of script scripts pretest pg ctl D db pgdata start amp amp dotenv e env test prisma migrate dev test dotenv e env test mocha posttest pg ctl D db pgdata stop The point here is to use Dotenv s API to use env test The last thing we need to do is clean up the database which is the first thing we applied for In the case of mocha this is done with beforeEach afterEach import PrismaClient from prisma client export class PrismaCleaner constructor prisma new PrismaClient this prisma prisma const propertyNames Object getOwnPropertyNames prisma this modelNames propertyNames filter name gt this isModelName name async clean console log Database cleaning return Promise all this modelNames map modelName gt this prisma modelName deleteMany param String name returns Boolean isModelName name return name match import as assert from assert import PrismaCleaner from index js import PrismaClient from prisma client const prisma new PrismaClient const cleaner new PrismaCleaner describe prisma cleaner gt beforeEach async gt await cleaner clean This afterEach async gt await cleaner clean This describe first creation gt it creates a user async gt const user await prisma user create data name John Lenon email john example com assert equal user name John Lenon describe second creation gt it creates a user async gt const user await prisma user create data name John Wick email john example com assert equal user name John Wick This is all you need to do By the way I found several libraries for this database cleanup but none of them worked perfectly emerleite node database cleaner The simplest way to clean your database after testsblazing edge labs node postgres cleaner Extremely simple way to clean your postgres databaseFor now I ll just publish my library this time cc kawakami prisma cleaner Prisma Cleaner is a utility for cleaning database with Prisma in testing You can use in Jest or Mocha etc The Prisma development experience is not as bad as I thought it would be but I feel that the testing environment is not yet ready so I wanted to commit to it Thank you for reading 2022-11-05 13:16:06
ニュース @日本経済新聞 電子版 米バークシャー、最終赤字3900億円 株評価損で7~9月 https://t.co/vlkD4mdWhv https://twitter.com/nikkei/statuses/1588893053364109312 最終赤字 2022-11-05 13:56:38
ニュース @日本経済新聞 電子版 国内コロナ感染、新たに7万5642人 累計2263万5704人 https://t.co/r8VTQ5KUkY https://twitter.com/nikkei/statuses/1588880643265437696 累計 2022-11-05 13:07:19
ニュース @日本経済新聞 電子版 円、理論値より割安に 日経均衡レート4~6月112円台 https://t.co/82LLx6jJYY https://twitter.com/nikkei/statuses/1588879746401652738 理論 2022-11-05 13:03:46
ニュース BBC News - Home Dover migrant centre attack driven by right-wing ideology - police https://www.bbc.co.uk/news/uk-england-63526659?at_medium=RSS&at_campaign=KARANGA dover 2022-11-05 13:41:17
ニュース BBC News - Home Train strikes: Passengers warned of disruption after walkouts suspended https://www.bbc.co.uk/news/business-63510380?at_medium=RSS&at_campaign=KARANGA november 2022-11-05 13:19:14
ニュース BBC News - Home Jordan Bardella: French National Rally has new leader to replace Le Pen https://www.bbc.co.uk/news/world-europe-63525377?at_medium=RSS&at_campaign=KARANGA bardella 2022-11-05 13:07:12
ニュース BBC News - Home T20 World Cup: Hales and Buttler lay foundation for England win https://www.bbc.co.uk/sport/av/cricket/63527045?at_medium=RSS&at_campaign=KARANGA T World Cup Hales and Buttler lay foundation for England winOpening batters Alex Hales and Jos Buttler get England off to a fast start to chase down Sri Lanka s and qualify for the semi finals of the T World Cup 2022-11-05 13:23:38
ニュース BBC News - Home Rugby League World Cup: England 54-4 Canada - Tara Stanley scores hat-trick https://www.bbc.co.uk/sport/rugby-league/63526814?at_medium=RSS&at_campaign=KARANGA canada 2022-11-05 13:50:58

コメント

このブログの人気の投稿

投稿時間:2021-06-17 05:05:34 RSSフィード2021-06-17 05:00 分まとめ(1274件)

投稿時間:2021-06-20 02:06:12 RSSフィード2021-06-20 02:00 分まとめ(3871件)

投稿時間:2020-12-01 09:41:49 RSSフィード2020-12-01 09:00 分まとめ(69件)