js |
JavaScriptタグが付けられた新着投稿 - Qiita |
外部の関数からthisを参照しようとしたら、エラー。 |
https://qiita.com/jungyeounjae/items/30dcabd5742cdb80184b
|
uncaughttype |
2023-01-09 16:01:47 |
AWS |
AWSタグが付けられた新着投稿 - Qiita |
AWS、EC2のデータベース操作(RDSを使用していない場合) |
https://qiita.com/satomi46/items/bc50f85196a7d2c0751a
|
rails |
2023-01-09 16:21:09 |
Linux |
CentOSタグが付けられた新着投稿 - Qiita |
GCE VMインスタンス Cent OS7 nginx Laravel SQL 接続 |
https://qiita.com/takehiro_kt/items/6cea54fffdc323248aac
|
centosnginxlaravelsql |
2023-01-09 16:52:44 |
GCP |
gcpタグが付けられた新着投稿 - Qiita |
GCE VMインスタンス Cent OS7 nginx Laravel SQL 接続 |
https://qiita.com/takehiro_kt/items/6cea54fffdc323248aac
|
centosnginxlaravelsql |
2023-01-09 16:52:44 |
GCP |
gcpタグが付けられた新着投稿 - Qiita |
Ingress のその先: Gateway API という選択 |
https://qiita.com/daisuke-yamamoto/items/5f07802a4360168114a2
|
cloud |
2023-01-09 16:26:12 |
Azure |
Azureタグが付けられた新着投稿 - Qiita |
AzureSQLでREST APIのパラメータ入力で沼った事 |
https://qiita.com/donnma777/items/d202512a7f5343a84d1c
|
azuresql |
2023-01-09 16:44:52 |
Ruby |
Railsタグが付けられた新着投稿 - Qiita |
ビューを使ってエラーメッセージを表示させる |
https://qiita.com/masatom86650860/items/2a68afa984efe5ff88cd
|
tiongtlthgtltpluralizear |
2023-01-09 16:56:47 |
Ruby |
Railsタグが付けられた新着投稿 - Qiita |
Rails7 -その2- importmapでbootstrap5の導入 |
https://qiita.com/devzooiiooz/items/262f71e737f94738debf
|
javascript |
2023-01-09 16:49:23 |
技術ブログ |
Developers.IO |
AWS Systems Manager と VS Code Remote SSH を組み合わせて快適なリモート開発環境を作る方法 |
https://dev.classmethod.jp/articles/how-to-use-vscode-remote-ssh-with-aws-systems-manager/
|
vscodere |
2023-01-09 07:13:24 |
海外TECH |
DEV Community |
Rust WebAssembly (wasm) on Arch Linux with Webpack (Rust 1.66) |
https://dev.to/nabbisen/rust-webassembly-wasm-on-arch-linux-with-webpack-rust-166-3aj6
|
Rust WebAssembly wasm on Arch Linux with Webpack Rust SummaryWebAssembly wasm in abbreviation is a binary instruction format It works on a stack based virtual machine It is not manually written as code Instead it is compiled from various programming languages such as C C Go and Rust rustlang In addition it is different in some ways from what assembly is originally You can find WebAssembly Core Specification in WC version which was published on Dec It says as to the core WebAssembly standard a safe portable low level code format designed for efficient execution and compact representation Where WebAssembly usually acts nowadays is in web browsers It is supported by four modern browsers FireFox Safari and Chrome Edge both based on Chromium Here is their Roadmap It has advantage on speed efficiency and safety and so it is expected to work not alternative to but along with JavaScript ECMAScript to make open web much better Well Rust is a general purpose programming language whose code can be compiled to WebAssembly Rust is also fast efficient and safe Also productive on development This post shows how to implement Rust code to generate wasm and deploy it EnvironmentOS Artix Linux based on Arch Linux App Rust Webassembly wasm bindgen wasm pack Node js Webpack Tutorial doas can be replaced with sudo Install required packages RustInstall Rust with rustup or directly This post may help you Use rustup recommended doas pacman Sy rustup rustup default stable Alternatively Install directly doas pacman Sy rust wasm bindgen Node js wasm bindgen helps us by facilitating high level interactions between Wasm modules and JavaScript in building wasm from Rust In other words without it you can t call even console log You can find it in the community repository Let s check doas pacman Ss wasmWill be printed as below world rust wasm WebAssembly targets for Rustgalaxy rustup installed The Rust toolchain installerextra rust wasm WebAssembly targets for Rustcommunity rustup installed The Rust toolchain installercommunity wasm bindgen Interoperating JS and Rust codecommunity wasm pack Your favorite rust gt wasm workflow tool community wasmer Universal Binaries Powered by WebAssemblycommunity wasmtime Standalone JIT style runtime for WebAssembly using CraneliftLet s install wasm bindgen above Run doas pacman Sy wasm bindgenThe output was Packages c ares nodejs wasm bindgen Processing package changes installing c ares installing nodejs Optional dependencies for nodejs npm nodejs package manager installing wasm bindgen You would see Node js come together wasm packIt helps us to build WebAssembly packages and publish them Run to install doas pacman Sy wasm packThe output was Packages wasm pack Processing package changes installing wasm pack YarnThis is optional node tasks are available alternatively Well if you prefer yarn run doas pacman Sy yarnThe output was Packages yarn Processing package changes installing yarn Here all required installation is finished Create a cargo lib projectRun cargo new wasm example libThe output was Created library wasm example packageAll generated were ├ーsrc├ーlib rs└ーCargo tomlCome in cd wasm example Add dependency to wasm bindgenFirst edit nvim Cargo tomlto add the lines below package name wasm example version edition See more keys and their definitions at lib crate type cdylib dependencies wasm bindgen Call JavaScript function via wasm bindgenNext edit the core src file nvim src lib rsReplace the original with use wasm bindgen prelude wasm bindgen extern C fn alert s amp str wasm bindgen pub fn greet name amp str alert amp format Hello name Here wasm bindgen brings window alert to wasm Note Code without wasm bindgenBesides the original generated was pub fn add left usize right usize gt usize left right cfg test mod tests use super test fn it works let result add assert eq result It works without wasm bindgen and however possibly less functional Build the libraryRun cargo buildThe output was Updating crates io index Downloaded wasm bindgen v Downloaded crates KB in s Compiling proc macro v Compiling quote v Compiling unicode ident v Compiling syn v Compiling log v Compiling wasm bindgen shared v Compiling cfg if v Compiling bumpalo v Compiling once cell v Compiling wasm bindgen v Compiling wasm bindgen backend v Compiling wasm bindgen macro support v Compiling wasm bindgen macro v Compiling wasm example v wasm example Finished dev unoptimized debuginfo target s in s Make the entrypointCreate index js as the entrypoint nvim index jsWrite in it Note that a dynamic import statement here is required due to webpack webpack but in theory import greet from pkg will work here one day as well const rust import pkg rust then m gt m greet World catch console error Here greet is called which is our custom function defined in src lib rs Install task runnerThe goal is nearby Prepare for Webpack Create nvim package jsonWrite in it license lt your license gt scripts build webpack serve webpack dev server devDependencies wasm tool wasm pack plugin text encoding html webpack plugin webpack webpack cli webpack dev server Then create nvim webpack config jsWrite in it const path require path const HtmlWebpackPlugin require html webpack plugin const webpack require webpack const WasmPackPlugin require wasm tool wasm pack plugin module exports entry index js output path path resolve dirname dist filename index js plugins new HtmlWebpackPlugin new WasmPackPlugin crateDirectory path resolve dirname Have this example work in Edge which doesn t ship TextEncoder or TextDecoder at this time new webpack ProvidePlugin TextDecoder text encoding TextDecoder TextEncoder text encoding TextEncoder mode development Ready Let s install Webpack yarn installThe output was yarn install v info No lockfile found Resolving packages Fetching packages Linking dependencies Building fresh packages success Saved lockfile Done in s Build and deployRun to build and publish env NODE OPTIONS openssl legacy provider yarn buildThe output was yarn run v webpackChecking for wasm pack wasm pack is installed ️Compiling your crate in development mode Your crate has been correctly compiled Version webpack Entrypoint main index js Done in s Done with success Yay Troubleshooting yarn build failed due to ssl providerWhen running only yarn build I mean without NODE OPTIONS openssl legacy provider you might meet the error below node internal crypto hash this kHandle new Hash algorithm xofLen Error error C digital envelope routines unsupported at new Hash node internal crypto hash at Object createHash node crypto at module exports wasm example node modules webpack lib util createHash js at NormalModule initBuildHash wasm example node modules webpack lib NormalModule js at handleParseError wasm example node modules webpack lib NormalModule js at wasm example node modules webpack lib NormalModule js at wasm example node modules webpack lib NormalModule js at wasm example node modules loader runner lib LoaderRunner js at iterateNormalLoaders wasm example node modules loader runner lib LoaderRunner js at Array lt anonymous gt wasm example node modules loader runner lib LoaderRunner js at Storage finished wasm example node modules enhanced resolve lib CachedInputFileSystem js at wasm example node modules enhanced resolve lib CachedInputFileSystem js at wasm example node modules graceful fs graceful fs js at FSReqCallback readFileAfterClose as oncomplete node internal fs read file context opensslErrorStack error digital envelope routines initialization error library digital envelope routines reason unsupported code ERR OSSL EVP UNSUPPORTED Node js v error Command failed with exit code info Visit for documentation about this command This is why env NODE OPTIONS openssl legacy provider is necessary It mitigates the error about ERR OSSL EVP UNSUPPORTED ConclusionLet s see our wasm works env NODE OPTIONS openssl legacy provider yarn serveThe output was yarn run v webpack dev serverChecking for wasm pack wasm pack is installed ️Compiling your crate in development mode 「wds」 Project is running at http localhost 「wds」 webpack output is served from 「wds」 Content not from webpack is served from wasm example INFO Checking for the Wasm target INFO Compiling to Wasm Finished dev unoptimized debuginfo target s in s WARN origin crate has no README INFO Optional fields missing from Cargo toml description repository and license These are not necessary but recommended INFO Done in s INFO Your wasm pkg is ready to publish at wasm example pkg Your crate has been correctly compiled「wdm」 Hash dafeafaVersion webpack Time msBuilt at PM Asset Size Chunks Chunk Names index js KiB emitted index js KiB emitted eabdabf module wasm KiB emitted immutable index html bytes emitted index js KiB main emitted mainEntrypoint main index js 「wdm」 Compiled successfully Connect to http localhost with you browser and you will be welcomed |
2023-01-09 07:13:54 |
海外TECH |
DEV Community |
DevOps is Dead! |
https://dev.to/simonholdorf/devops-is-dead-2n7b
|
DevOps is Dead DevOps is dead Platform engineering takes over I heard this several times over the last month But is it true Are companies turning away from DevOps and should you switch careers I ve made a video to set the record straight |
2023-01-09 07:10:36 |
海外TECH |
DEV Community |
Configuring Docker Syslog Logging Driver for Docker Dameon & Containers |
https://dev.to/danielfavour/configuring-docker-syslog-logging-driver-for-docker-dameon-containers-1aoj
|
Configuring Docker Syslog Logging Driver for Docker Dameon amp ContainersThis article was originally written by me for SigNoz Logs are useful for troubleshooting and identifying issues in applications as they provide a record of events and activities However managing log data can be challenging due to the large volume of log events generated by modern applications as well as the need to balance the level of detail in the logs and the impact on the application s performance Collecting logs from Docker can be challenging when running a large number of containers or running Docker on multiple hosts These challenges include managing a large volume of logs accessing logs from multiple hosts ensuring the security of logs and getting a comprehensive view of container and application behavior A centralized logging system can help address these challenges by allowing you to store and manage all of your logs in a single location Docker Syslog is a built in logging system provided by Docker that allows you to centralize and manage the logs produced by your Docker containers In this article we will delve into the capabilities of Docker Syslog discuss how to configure and use it as a centralized logging solution for your Docker containers and demonstrate how it can be utilized to effectively manage and analyze your Docker logs Understanding SyslogSyslog stands for System Logging Protocol Syslog is a logging protocol that enables the collection and management of log messages from various devices and systems in a central location for monitoring and resolving issues on servers and networks It is also the standard protocol used to send system log or event messages to a specific server called a Syslog server A syslog server is a network server that collects and stores log messages from devices and applications in a centralized location It uses the syslog protocol which is a standard for sending log messages over a network to receive log messages from various sources and store them in a database or log file for further analysis and management Syslog servers are commonly used to monitor and troubleshoot issues as well as to comply with regulatory and security requirements There are many Syslog servers available including open source options such as Rsyslog Syslog ng and commercial solutions like Syslog server What is Docker Syslog Docker Syslog is a logging driver for Docker that allows you to send container logs to a syslog server It is an integral part of the Docker engine providing a native and reliable way to manage the logs from your Docker containers With Docker Syslog you can centralize and manage the logs from your Docker containers in a single place making it easier to monitor and troubleshoot issues This means that when Docker runs applications the log messages produced by those applications can be sent to the Syslog server for centralized storage and analysis Docker Syslog integrates with Syslog servers allowing you to use the tools provided by them to manage and analyze the logs It also offers customization options such as the ability to specify the log format and Syslog facility allowing you to tailor the logging behavior to fit your specific needs Setting up Docker SyslogThe syslog logging driver can be setup for both the Docker daemon and for containers Setting up Syslog Logging driver for Docker DaemonTo configure the Docker Daemon to the Syslog driver Step Go to the Docker daemon configuration file location On Linux etc docker daemon json directoryOn Windows C ProgramData docker config daemon jsonTo use the Syslog driver as the default logging driver for Docker on Linux you need to set the log driver and log opt Step Setup the logging driver log driver syslog Step Add options for the Syslog logging driver by including the log opts key These options may include Syslog address Syslog facility and Syslog format This will set the Syslog driver as the default logging driver for the Docker daemon The Docker daemon s logs will be written to the syslog server according to the specified configuration This will set the Syslog driver as the default logging driver for the Docker daemon The Docker daemon s logs will be written to the Syslog server according to the specified configuration An example is shown below log driver syslog log opts syslog address tcp The log driver and log opt options are used to configure the logging driver for Docker The logging driver determines how Docker handles log messages from containers and how it stores or forwards them The log driver option specifies the logging driver to useThe log opts option allows you to pass additional options to the logging driver In the above configuration the additional option passed in is the syslog address option The syslog address option is used to specify the address of a syslog server Docker will send the container s log output to the specified Syslog server There are more log opts options which can be applied to fit your specific needs log driver syslog log opts syslog address tcp syslog facility daemon syslog format rfcmicro To view a complete list of the log opts options available visit the official docker documentation page Step Configure and save the daemon json file then restart the Docker daemon to apply the changes sudo systemctl daemon reloadsudo systemctl restart docker Setting up Syslog Logging driver for Docker ContainersIf you decide to configure the syslog driver for individual or specific containers you can use the log driver and log opt options when starting the container Examples as shown belowdocker run log driver syslog log opt syslog address udp alpine echo hello worlddocker run log driver syslog log opt syslog address tcp syslog server host log opt syslog facility daemon log opt syslog format json image nameThe syslog facility option is used to specify the syslog facility value that should be associated with the container s log messages The Syslog facility value is a numeric or symbolic value that identifies the source of the log message and is used to categorize and filter the log data Sample values that can be used include auth cron daemon kern etc The syslog format option is used to specify the format in which the container s log messages should be sent to the Syslog server Example of more formats that could be used in Docker include json rfc rfc text etc Final ThoughtsIn this article we discussed Syslog Docker Syslog as a logging driver and how to set it up for Docker daemon and containers It is important to have a separate log management platform that provides additional capabilities and flexibility for managing and analyzing the Syslog logs from your Docker containers A centralized log management tool can also help to ensure that you have a robust and scalable solution for log analytics that meets your specific needs and requirements as the Syslog server or logging driver may not have the necessary features or capabilities to fully manage and analyze the logs For example you may want to perform complex log parsing filtering or transformation operations that are not possible with the Syslog server or logging driver An advanced centralized logging platform tool for collecting your logs is SigNoz an open source log management solution Docker Logs analysis with SigNozSigNoz is a full stack open source Application Performance Monitoring tool that you can use for monitoring logs metrics and traces One key aspect of observability is log management and SigNoz provides a range of tools for collecting analyzing and visualizing Docker logs It uses ClickHouse a columnar database to efficiently store and provide access to log data for analysis SigNoz uses OpenTelemetry for instrumenting applications OpenTelemetry backed by CNCF is quickly becoming the world standard for instrumenting cloud native applications The logs tab in SigNoz has advanced features like a log query builder search across multiple fields structured table view JSON view etc SigNoz offers real time analysis of logs enabling you to search filter and visualize them as they are generated This can assist in identifying patterns trends and problems in the logs and resolving issues efficiently With advanced Log Query Builder you can filter out logs quickly with a mix and match of fields Getting started with SigNozSigNoz can be installed on macOS or Linux computers in just three steps by using a simple install script The install script automatically installs Docker Engine on Linux However on macOS you must manually install Docker Engine before running the install script git clone b main cd signoz deploy install shYou can visit our documentation for instructions on how to install SigNoz using Docker Swarm and Helm Charts Related PostsDocker Logging Complete Guide Configuration and Logging StrategiesDocker Log Rotation Configuration Guide |
2023-01-09 07:08:00 |
海外TECH |
CodeProject Latest Articles |
Encryption -- accessory_java |
https://www.codeproject.com/Articles/5349970/Encryption-accessory-java
|
multiple |
2023-01-09 07:27:00 |
海外科学 |
BBC News - Science & Environment |
UK space launch: Historic Cornwall rocket mission set to blast off |
https://www.bbc.co.uk/news/science-environment-64190848?at_medium=RSS&at_campaign=KARANGA
|
cornwall |
2023-01-09 07:20:34 |
海外ニュース |
Japan Times latest articles |
Work to create single Yamanote Line platform at Shibuya Station is completed |
https://www.japantimes.co.jp/news/2023/01/09/national/shibuya-yamanote-platform-work-completed/
|
Work to create single Yamanote Line platform at Shibuya Station is completedOn Monday many passengers and railway fans were seen on the new platform which is up to meters wider with trains arriving on both |
2023-01-09 16:10:34 |
海外ニュース |
Japan Times latest articles |
Japan to restart scaled-down domestic travel discount program |
https://www.japantimes.co.jp/news/2023/01/09/national/travel-discount-program/
|
Japan to restart scaled down domestic travel discount programThe maximum discount to be awarded per tourist per night will be lowered from to including shopping coupons that can be used at |
2023-01-09 16:09:36 |
海外ニュース |
Japan Times latest articles |
Japan’s Coming of Age Day sees shifts following lowered age of adulthood |
https://www.japantimes.co.jp/news/2023/01/09/national/coming-of-age-day-ceremony-changes/
|
Japan s Coming of Age Day sees shifts following lowered age of adulthoodLocal governments are taking diverging approaches to the ceremonies held on the day with some continuing to only hold them for year olds |
2023-01-09 16:01:10 |
ニュース |
BBC News - Home |
Brazil Congress: Lula vows to punish supporters of Bolsonaro after riot |
https://www.bbc.co.uk/news/world-latin-america-64204860?at_medium=RSS&at_campaign=KARANGA
|
court |
2023-01-09 07:08:19 |
ニュース |
BBC News - Home |
Prince Harry attacks lack of royal defence for Meghan after Jeremy Clarkson column |
https://www.bbc.co.uk/news/uk-64205474?at_medium=RSS&at_campaign=KARANGA
|
recent |
2023-01-09 07:38:16 |
ニュース |
BBC News - Home |
UK space launch: Historic Cornwall rocket mission set to blast off |
https://www.bbc.co.uk/news/science-environment-64190848?at_medium=RSS&at_campaign=KARANGA
|
cornwall |
2023-01-09 07:20:34 |
ニュース |
BBC News - Home |
NHS to buy care beds to make space in hospitals |
https://www.bbc.co.uk/news/health-64204367?at_medium=RSS&at_campaign=KARANGA
|
crisis |
2023-01-09 07:45:48 |
ニュース |
BBC News - Home |
Australian Open: Players can compete if they have Covid-19 |
https://www.bbc.co.uk/sport/tennis/64207954?at_medium=RSS&at_campaign=KARANGA
|
covid |
2023-01-09 07:26:57 |
北海道 |
北海道新聞 |
EV市場、日本は劣勢 海外メーカーが上位独占 |
https://www.hokkaido-np.co.jp/article/784995/
|
世界販売 |
2023-01-09 16:17:57 |
北海道 |
北海道新聞 |
豊頃で住宅火災、1人死亡 |
https://www.hokkaido-np.co.jp/article/785011/
|
十勝管内 |
2023-01-09 16:31:00 |
北海道 |
北海道新聞 |
北海道内1584人感染 4人死亡 5日ぶり前週下回る 新型コロナ |
https://www.hokkaido-np.co.jp/article/784993/
|
北海道内 |
2023-01-09 16:28:56 |
北海道 |
北海道新聞 |
<横田教授の「コロナ」チェック>全道的に横ばい インフルとの同時流行へ備えを |
https://www.hokkaido-np.co.jp/article/785009/
|
新型コロナウイルス |
2023-01-09 16:25:00 |
北海道 |
北海道新聞 |
あべのハルカス20歳が階段挑む 地上300m1637段 |
https://www.hokkaido-np.co.jp/article/785008/
|
高さ |
2023-01-09 16:25:00 |
北海道 |
北海道新聞 |
全国旅行支援、10日再開 割引縮小、最大7千円に |
https://www.hokkaido-np.co.jp/article/785007/
|
年末年始 |
2023-01-09 16:18:00 |
北海道 |
北海道新聞 |
日米首脳、宇宙で連携強化を確認 日本人初の月面着陸へ協力加速 |
https://www.hokkaido-np.co.jp/article/785004/
|
首脳会談 |
2023-01-09 16:04:00 |
北海道 |
北海道新聞 |
道南106人感染 函館は75人 新型コロナ |
https://www.hokkaido-np.co.jp/article/785003/
|
医療機関 |
2023-01-09 16:02:00 |
コメント
コメントを投稿