投稿時間:2022-11-19 21:19:55 RSSフィード2022-11-19 21:00 分まとめ(25件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
python Pythonタグが付けられた新着投稿 - Qiita 【畜生】Pythonを使って車校の技能実習予約を自動化したBlog (1/n)【セコ技】 https://qiita.com/DMats/items/19bedfc4b9f8377f3a08 blogn 2022-11-19 20:39:02
python Pythonタグが付けられた新着投稿 - Qiita Selenium コードを GUI で自動生成して実行するアプリを作りました https://qiita.com/YmBIgo/items/160d9b466abc047fe3f4 selenium 2022-11-19 20:00:30
AWS AWSタグが付けられた新着投稿 - Qiita Selenium コードを GUI で自動生成して実行するアプリを作りました https://qiita.com/YmBIgo/items/160d9b466abc047fe3f4 selenium 2022-11-19 20:00:30
Docker dockerタグが付けられた新着投稿 - Qiita 【Docker】mount=type=cacheの使い方【Rails】 https://qiita.com/P-man_Brown/items/b37299c3d09bfd8693c8 workdirhomeus 2022-11-19 20:07:35
Ruby Railsタグが付けられた新着投稿 - Qiita デプロイ後の運用 https://qiita.com/Apiyo/items/1fde81c7143773d226c7 userna 2022-11-19 20:46:00
Ruby Railsタグが付けられた新着投稿 - Qiita 【Docker】mount=type=cacheの使い方【Rails】 https://qiita.com/P-man_Brown/items/b37299c3d09bfd8693c8 workdirhomeus 2022-11-19 20:07:35
技術ブログ Developers.IO Amazon QuickSight の一部のビジュアルで Small Multiples オプションが利用可能になりました https://dev.classmethod.jp/articles/11-amazon-quicksight-small-multiples-line-bar-pie-charts/ amazonquicksight 2022-11-19 11:46:23
海外TECH MakeUseOf iMessage Sent as Text Message: Am I Blocked? https://www.makeuseof.com/imessage-sent-as-text-message/ contact 2022-11-19 11:30:15
海外TECH MakeUseOf What Is a Security Token Offering (STO) and How Does It Work? https://www.makeuseof.com/what-is-a-security-token-offering/ offering 2022-11-19 11:15:14
海外TECH DEV Community Add Umami Analytics to a Web Application https://dev.to/documatic/add-umami-analytics-to-a-web-application-4h36 Add Umami Analytics to a Web Application IntroductionAnalytics plays an important role in knowing the user and the performance of a website People ask me about my audience s country and views for sponsored posts on my website So knowing your audience is always a plus point Analytics can also be helpful in knowing your least and best performing page article You can work on the least one to improve it Google Analytics is a fantastic tool to know your traffic but it s better for non developer people to add analytics Umami is a self hosted web analytics solution that is open source and privacy focused You can customize the database and hosting as per your need The feature that impresses me is that with one click you can get a shareable link to the analytics for sharing That s why Hashnode uses Umami to provide article analytics to users A solid reason to at least give it a try So today we are going to look into adding analytics to a web application with Umami We are going to cover the following topics Installing UmamiSetting up databaseDeploying Umami to VercelAdding a script to our web pageCollecting the dataThe topics look a lot but the setup is quite easy if you are familiar with web development So let s get started with it Prerequisite and environment setupThe guide is simple but you need to have at least basic knowledge of web development and GitHub We are going to code anything but this will help you understand it better As for the tools we need to have the following tools pre installed Git It is a distributed version control system This will help fork the Umami repository and push code to GitHub for deployment on Vercel Node It provides you with a JavaScript runtime environment We will use this for installing dependencies and running the Umami server locally Umami needs yarn for installing the package npm might give some error After installing Node you can run the below command to install the yarn globally Enter the command in the terminal npm install g yarn Installing UmamiNavigate to the directory in which you want to create the project and open the terminal to enter the below command one by one in the terminal This will fork a repository from GitHub git clone https github com umami software umami git cd umami yarn installThis will install the dependencies of our Umami server DatabaseWe need to have a database to store user and analytics details Umami supports SQL and PostgreSQL for databases We are not going to use any local database we are going to use PostgreSQL from the supabase It provides an all in one solution to the backend having support for Database Authentication instant APIs Edge Functions Realtime subscriptions and Storage Now go to their website through supabase com and click on Start your project After registering logging in you will be redirected to their project page Here click on New project to create a new project You will redirect to Create a new project page Fill in the details related to the project Note The password section does not support some special characters So avoid using them You can use their Generate a password to generate a strong password that will not have any errors Now after creating the project then click on Setting from the left panel Then select Database and scroll down to the bottom to find the Connection string The connecting string will look like postgres postgres YOUR PASSWORD host postgres Replace the YOUR PASSWORD with the project s password and add pgbouncer true at the end Now back to the code editor Create a env file at the root and add two environment variables DATABASE URL for adding the connecting string and HASH SALT for adding a random string for hashing This will make our env file DATABASE URL postgres postgres YOUR PASSWORD host postgres pgbouncer true HASH SALT any random stringNow it s time to create a build Open the terminal and run the below command to create a production ready build yarn buildThis will take some time after successfully creating the build Run the below command to start the umami server locally yarn startIf the server start running check it on the machine by going to http localhost By default the user will be admin and the password will be umami Enter the credentials for logging in After logging in change the password by navigating to Setting →Profile →Change password Now we are ready to deploy the umami web app to a hosting provider Deploying UmamiWe need to have our code in a repository either on GitHub GitLab or Bitbucket Choose whatever you feel comfortable with Push the code them You can check DigitalOcean s How to Push an Existing Project to GitHub guide to push code to GitHub As the Umami is made using NextJS it will be a better option to host it on vercel So we are going to host the umami web app on vercel Navigate to vercel com after registering login then click on Add new… then Project In the Import Git Repository page click on the option where you have pushed the code Then it might ask you for permission to access the repository provide that After this you will have your repository select the one where you have pushed the code Now you will be redirected to Configure Project Vercel will automatically detect the framework that is NextJS and will run the build accordingly we don t need to change anything from the Build and Output Setting We need to add the Environment Variables Click on it and add the environment variable that we have added in the env file initially After this click on Deploy to start the process of deployment After successful deployment visit the website and log in with the changed password If everything goes well you will be able to see the dashboard Now it s time to add a website and collect data Adding Website and Collecting DataOn your Umami s vercel page navigate to Setting →Websites → Add website for adding website for analytics Enter the required information on the webpage and configuration Let s look into the field one by one Name Enter a relevant name for the website Domain Enter the domain of the website This should not include the HTTP Owner When you will have multiple users this will be helpful to sort Initially select the admin Enable share URL Check this box for getting a shareable URL for the analytics Now click on Save to save the website This will result in the above screenshot Click on the code logo to get the code added to our website for data col collectionAdd the code to the Head section of the website for collecting the data After successfully adding the code and deploying your website you will be able to see the analytics in the dashboard section of the Umami Note To test the visit visit the website from another device from the same device it will not register the view Otherwise you can always check the website s code from the inspect tool of the browser ConclusionWe have gone from running Umami locally to deploying it on the web Once set up you won t need to do anything the data will be collected and display by the Umami It will show analytics for views visitors pages referrers browsers OS devices and countries with a map This variety of data will be enough to work on it Also you can always share these analytics with anyone with a link Umami also tracks events from your webpage It s also quite easy to set up You can look at the docs here for more information regarding event tracking I hope this article has helped you in knowing the Umami tool for analytical solutions Thanks for reading the blog post 2022-11-19 11:30:00
海外TECH DEV Community How I Fixed a Linux Disk Performance Issue In Minutes! - A Step by Step Guide to Optimizing Linux System https://dev.to/howtouselinux/how-i-fixed-a-linux-disk-performance-issue-in-minutes-a-step-by-step-guide-to-optimizing-your-system-26o9 How I Fixed a Linux Disk Performance Issue In Minutes A Step by Step Guide to Optimizing Linux SystemI was recently tasked with solving a tricky disk performance issue on a Linux server At first I thought it would be a straightforward task After all I had been working in IT for several years and had seen my fair share of disk performance issues But as soon as I started looking into the issue I quickly realized that this wasn t going to be an easy fix There are disks on that Linux system and the disk performance seemed to vary from time to time I started by trying some of the more obvious solutions ーchecking disk space checking hardware status listing partitions checking RAID status etc But none of those seemed to be having any issues At this point I was beginning to lose hope But then I remembered something my mentor had said when I first started in IT “When all else fails go back to basics I decided to start from the very beginning I checked the physical connections of the disks making sure all cables were securely connected and in the right places Once that was done I followed the steps here to check disk performance I began running a monitor with the iostat command on each disk to see if I could identify any areas where performance might be suffering After a few hours I found one disk that had abnormally high latency After carefully examining the disk I was able to pinpoint a specific area where data transfers were taking much longer than usual After further investigation I realized that this issue was caused by a high workload on the disk The IOPS for that disk was increased by times and disk utilization was during the issue time Then I used the iotop command to check which process generated so much workload on this disk It was a process related to Database I checked this with the Database team It turned out that they added a SQL recently which trigged the full table scan on the database side They fixed this sql by adding an index on the DB side After that the latency dropped significantly and the overall performance of the disk improved drastically Problem solved It took me a few hours to fix the issue but in the end it was worth it I learned an important lesson that day Sometimes if you take the time to go back to basics and examine things from a different angle it can make all the difference Now I can proudly say that I have a deep understanding of disk performance in Linux and the skill set to tackle any issue that might arise And it all started with that one disk performance issue The moral of this story is simple don t give up With the right knowledge and approach any problem can be solved even those that seem impossible at first This was true for me when I faced my disk performance issue in Linux ーand it can be true for you too Good luck 2022-11-19 11:25:36
海外TECH DEV Community Kyverno Policy As Code Using CDK8S https://dev.to/aws-builders/kyverno-policy-as-code-using-cdk8s-3ibe Kyverno Policy As Code Using CDKS AbstractKyverno Kyverno is a policy engine designed for Kubernetes Kyverno policies can validate mutate and generate Kubernetes resources plus ensure OCI image supply chain security In this blog it provides the way to create Kyverno policy as code using CDKS typescript With importing Kyverno CRDs and using CDKS you can create Kyverno policy manifest using your familiar programming languages such as typescript as scale Table Of ContentsPre requisiteOverview of KyvernoImport Kyverno CRDsWrite codeBuild Kyverno policy from codeApply and testTest Restart Deployment On Configmap ChangeConclusion Pre requisite Install typescript node and cdks as well as projen optional which is a tool of managing project configuration as code Getting started with cdksEKS kubernetes cluster to test Overview of Kyverno The features arePolicies as Kubernetes resources in YAMLValidate mutate or generate any resource using Kustomize overlaysMatch resources using label selectors and wildcardsBlock non conformant resources using admission controls or report policy violationsTest policies and validate resources using the Kyverno CLI in your CI CD pipeline before applying them to your clusterHow does it work Import Kyverno CRDs Import kyverno CRDs as cdks lib cdks import output src imports Importing resources this may take a few moments kyverno io kyverno io clusterpolicyOutput of importing tree src imports src imports └ーkyverno io ts directories file Write code It s much more convinient to use visual code writing Kyverno policies in typescript language We can read the document and find all references of construct objects and properties of Kyverno policies through code descriptions On top of all polices there s simple construct feel free to implement more the construct so that each policy just need to input name pattern etc Interface of kyverno propertiesexport interface KyvernoProps name string message string namespace string action ClusterPolicySpecValidationFailureAction kinds Array lt string gt resources exclude ClusterPolicySpecRulesExclude deny ClusterPolicySpecRulesValidateDeny pattern anyPatterns The construct classexport class KyvernoClusterPolicy extends Chart constructor scope Construct name string kyvernoProps KyvernoProps super scope name new ClusterPolicy this kyvernoProps name metadata name kyvernoProps name namespace kyvernoProps namespace undefined annotations policies kyverno io category Pod Security Standards spec validationFailureAction kyvernoProps action ClusterPolicySpecValidationFailureAction ENFORCE rules name kyvernoProps name match any resources kyvernoProps resources kinds Pod validate deny kyvernoProps deny undefined message kyvernoProps message pattern kyvernoProps pattern undefined anyPattern kyvernoProps anyPatterns undefined exclude kyvernoProps exclude undefined This blog provides example of usecasesDeny delete objects which have label protected true require app labelrequire request limitRequire run as non root Restart Deployment On Configmap Change Build Kyverno policy from code Source code tree src src ├ーimports │└ーkyverno io ts ├ーkyverno policies │├ーdeny delete resources ts │├ーkverno list ts │├ーkyvernoProps ts │├ーrequire app labels ts │├ーrequire requests limits ts │└ーrequire runasnonroot ts ├ーmain ts └ーtest yaml ├ーinflate negative test deployment yaml └ーinflate positive test deployment yaml directories filesBuild npx projen build build »default ts node project tsconfig dev json projenrc ts build »compile tsc build build »post compile »synth cdks synth No manifests synthesized build »test jest passWithNoTests all updateSnapshot No tests found exiting with code File Stmts Branch Funcs Lines Uncovered Line s All files build »test »eslint eslint ext ts tsx fix no error on unmatched pattern src test build tools projenrc projenrc tsOutput yaml files tree dist dist └ーkyverno ├ーrequire app label kyverno policy yaml ├ーrequire request limit kyverno policy yaml └ーrun as non root kyverno policy yaml directory files Apply and test Apply policies and check result kubectl apply f dist kyverno clusterpolicy kyverno io require app label configured clusterpolicy kyverno io require request limit configured clusterpolicy kyverno io run as non root configuredTest negative the deployment inflate negative test deployment yaml does not have resource limit and request and enable runAsNonRoot kubectl apply f src test yaml inflate negative test deployment yaml Error from server error when creating src test yaml inflate negative test deployment yaml admission webhook validate kyverno svc fail denied the request policy Deployment default inflate negative test for resource violations require app label require request limit autogen require request limit validation error All containers must have CPU and memory resource requests and limits defined rule autogen require request limit failed at path spec template spec containers resources limits Test positive kubectl apply f src test yaml inflate positive test deployment yaml deployment apps inflate positive test createdTest without non root user enabled because the validation failure action is AUDIT so the deployment is applied successfully kubectl apply f src test yaml inflate without nonroot test deployment yaml deployment apps inflate without nonroot test createdBut let s view the policy violations kubectl describe polr polr ns default grep inflate A B grep Result fail B Seconds Category Pod Security Standards Message validation error Containers must be required to run as non root users This policy ensures runAsNonRoot is set to true rule autogen run as non root failed at path spec template spec securityContext runAsNonRoot rule autogen run as non root failed at path spec template spec containers securityContext Policy run as non root Resources API Version apps v Kind Deployment Name inflate without nonroot test Namespace default UID bc c f aef cacc Result fail Test Restart Deployment On Configmap Change Changing configmap require rollout restart of deployments which reference to that configmap We can use kyverno to automate this for us Create kyverno policy to watch a Configmap and if it changes will write an annotation to one or more target Deployments thus triggering a new rollout and thereby refreshing the referred ConfigmapFirst we need to grant additional privileges to the Kyverno ServiceAccount for updating apps deployments resources through Aggregated ClusterRolesKyverno has clusterrole with aggregationRule which will combine all clusterrole with label app kyverno into one in aggregationaggregationRule clusterRoleSelectors matchLabels app kyvernoCreate new kyverno clusterrole to inject to the main one kyverno clusterrole ts Kyverno policy to Restart Deployment On Configmap Change restart on configmap changes tsRebuild project to generate manifest yaml files npx projen build tree dist dist ├ーkyverno │├ーrequire app label kyverno policy yaml │├ーrequire request limit kyverno policy yaml │├ーrestart on configmap change policy yaml │└ーrun as non root kyverno policy yaml └ーrole └ーkyverno create deployments clusterrole yaml directories filesApply clusterrole and policy then test using inflate positive test deployment yaml and inflate test configmap yaml kv get cpol restart on configmap change NAME BACKGROUND ACTION READY restart on configmap change true audit true kv get deploy l app inflate positive test NAME READY UP TO DATE AVAILABLE AGE inflate positive test m kv get cm l app inflate test configmap NAME DATA AGE inflate test configmap mWe now update the configmap to see kyverno rollout restart the deployment kv apply f inflate test configmap yaml configmap inflate test configmap configured kv get pod l app inflate positive test watch NAME READY STATUS RESTARTS AGE inflate positive test b cdggl Running ms inflate positive test bbc lxcjx Pending s inflate positive test b cdggl Terminating ms inflate positive test bbc lxcjx Pending s inflate positive test bbc lxcjx ContainerCreating s inflate positive test bbc lxcjx Running s inflate positive test b cdggl Terminating ms inflate positive test b cdggl Terminating msReference Conclusion Someone said Kyverno policy as code but the code in yaml language it s not actual programming language Using CDKS to generate Kyverno policy help to leverage the strong programming skill of developer and structure project more efficiently Vu Dao Follow AWSome Devops AWS Community Builder AWS SA ️CloudOpz ️ vumdao vumdao 2022-11-19 11:08:21
海外ニュース Japan Times latest articles China restates vow for freer regional trade, but path forward unclear https://www.japantimes.co.jp/news/2022/11/19/business/economy-business/china-free-trade-apec/ China restates vow for freer regional trade but path forward unclearNoting that only openness inclusiveness and win win cooperation is the right way forward for humanity Xi said that China will continue working toward joining the 2022-11-19 20:25:22
海外ニュース Japan Times latest articles Kishida considering replacing scandal-hit internal affairs minister https://www.japantimes.co.jp/news/2022/11/19/national/politics-diplomacy/kishida-cabinet-reshuffle-decision/ government 2022-11-19 20:12:02
海外ニュース Japan Times latest articles FIFA chief blasts ‘hypocrisy’ of Western nations on eve of World Cup https://www.japantimes.co.jp/sports/2022/11/19/soccer/international-soccer/fifa-president-qatar-defend/ FIFA chief blasts hypocrisy of Western nations on eve of World CupThe build up to the tournament has been dominated by concerns over Qatar s treatment of migrant workers women and the LGBTQ community to the visible annoyance 2022-11-19 20:40:10
ニュース BBC News - Home Fifa boss accuses West of hypocrisy in World Cup speech https://www.bbc.co.uk/sport/football/63687412?at_medium=RSS&at_campaign=KARANGA world 2022-11-19 11:51:42
ニュース BBC News - Home Search resumes for woman 'swept away' by river https://www.bbc.co.uk/news/uk-scotland-63687963?at_medium=RSS&at_campaign=KARANGA warning 2022-11-19 11:37:33
ニュース BBC News - Home Australia v England: Hosts clinch ODI series win with victory in Sydney https://www.bbc.co.uk/sport/cricket/63686825?at_medium=RSS&at_campaign=KARANGA Australia v England Hosts clinch ODI series win with victory in SydneySteve Smith hits a high class as Australia beat England by runs in the second ODI to secure a series win with a game to spare 2022-11-19 11:28:04
サブカルネタ ラーブロ 狐狸丸@蒲田この日は、絶賛二日酔い中だった事もあり、あっさり優しいのを身体が求めていた... http://ra-blog.net/modules/rssc/single_feed.php?fid=204722 instagram 2022-11-19 11:34:12
北海道 北海道新聞 北見北斗高ラグビー部で「いじめ」 道教委へ報告 https://www.hokkaido-np.co.jp/article/763080/ 北見北斗 2022-11-19 20:23:00
北海道 北海道新聞 鈴木知事「地域活性化の起爆剤」 白滝遺跡群出土品、国宝指定にコメント https://www.hokkaido-np.co.jp/article/763079/ 地域活性化 2022-11-19 20:11:00
北海道 北海道新聞 金正恩氏娘の「ジュエ」さん? 長女か次女、公開写真の少女 https://www.hokkaido-np.co.jp/article/763078/ 北朝鮮メディア 2022-11-19 20:08:00
北海道 北海道新聞 20日午前の復旧目指す フレッツ光・ひかり電話 旭川の一部で接続できず https://www.hokkaido-np.co.jp/article/763053/ 春光台 2022-11-19 20:06:31
北海道 北海道新聞 空知管内486人感染 新型コロナ https://www.hokkaido-np.co.jp/article/763074/ 空知管内 2022-11-19 20:04:00
北海道 北海道新聞 立憲道連など4者が「民主連絡調整会議」設置 知事選候補者の擁立急ぐ 難航し越年も https://www.hokkaido-np.co.jp/article/763073/ 国民民主党 2022-11-19 20:03:00

コメント

このブログの人気の投稿

投稿時間: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件)