投稿時間:2023-07-06 01:17:37 RSSフィード2023-07-06 01:00 分まとめ(23件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
IT 気になる、記になる… 「Nothing Phone (2)」のプロモーション画像が流出 https://taisy0.com/2023/07/06/173667.html evanblass 2023-07-05 15:00:36
AWS AWS - Webinar Channel Optimize Amazon RDS and Aurora Costs with ElastiCache for Redis - AWS Databases in 15 https://www.youtube.com/watch?v=JAoNlGqn124 Optimize Amazon RDS and Aurora Costs with ElastiCache for Redis AWS Databases in Amazon ElastiCache is a fully managed Redis and Memcached compatible service delivering real time cost optimized performance for modern applications ElastiCache scales to hundreds of millions of operations per second with microsecond response time and offers enterprise grade security and reliability In this session learn about the financial advantages of caching RDS Aurora workloads including how you can save up to in cost and gain up to x faster read performance using ElastiCache with RDS for MySQL vs RDS for MySQL alone Learning Objectives Objective Receive an introduction on the financial advantages of caching your RDS and Aurora workloads Objective Receive an introduction on ElastiCache implementation strategies Objective Watch a demo on how to easily optimize your RDS and Aurora workloads with ElastiCache to optimize costs and boost performance To learn more about the services featured in this talk please visit To download a copy of the slide deck from this webinar visit 2023-07-05 15:15:01
python Pythonタグが付けられた新着投稿 - Qiita SECCON beginners ctf 2023でFormat String Bugを学ぶ https://qiita.com/hachan0179/items/ff6053039353dbf53d8f forgotsomeexplo 2023-07-06 00:29:33
python Pythonタグが付けられた新着投稿 - Qiita PythonでMisskeyのBotを作る https://qiita.com/yupix/items/8734fbf4e934c27b4b9b misskey 2023-07-06 00:00:25
技術ブログ Developers.IO AWS Chalice を使って、ChatGPT Slack Appを作成してみた(LangChain編) https://dev.classmethod.jp/articles/aws-chalice-chatgpt-slack-app-langchain/ awschalice 2023-07-05 15:05:01
海外TECH MakeUseOf Shift Key Not Working on Windows? Try These Fixes https://www.makeuseof.com/shift-key-not-working-windows/ shift 2023-07-05 15:15:18
海外TECH DEV Community What to Expect of AdonisJS 6? https://dev.to/adonisframework/what-to-expect-of-adonisjs-6-2daj What to Expect of AdonisJS If you have been following us on Twitter you might have seen us talking about AdonisJS v “A new major version of the AdonisJS framework We ve spent four years in the AdonisJS v era and it s time to move to the AdonisJS v era with some fresh ideas But don t worry Migrating your apps to AdonisJS v will be easy It might take a few hours or a couple of days depending on the size of your application We will also provide a command line tool to help move your code to the new version AdonisJS is a modular framework with a feature rich core i e the adonisjs core package and a collection of officially maintained packages Each package follows its own release cycle and semver versioning We are significantly updating the framework core in this release i e AdonisJS v The main goal of this update is to work more closely with the platform We want to use new features of JavaScript and Node js ensure your apps have better type safety and keep improving the framework performance Updating minimum requirementsBecause we re using new features from Node js your system needs to have at least Node js version or higher This version is the current Long Term Support release Note You can easily manage and upgrade your Node js version with tools like Volta Switching to ECMAScript Modules ESM The most significant change in this update is that we re moving to ECMAScript modules ESM Right now AdonisJS uses and compiles to CommonJS CJS format Moving to ESM lets us use new language features and stay updated with the ecosystem What does this mean for your app Your apps will be able to use the new platform features that work in ESM like the Top Level Await statement and Node js subpath imports The good part is ESM applications can load and use CommonJS packages But not the other way around Therefore moving to ESM is a must New asset bundlerMany of you have asked for this so we re excited to announce that AdonisJS will include Vite as the default asset bundler Note We will continue to maintain the Webpack Encore as well Therefore if you are not ready to move to Vite you can use Webpack Encore Better documentationThere are some lapses in the current documentation of AdonisJS For example topics like IoC Container Service providers and Package development are undocumented Also the docs should be more comprehensive With AdonisJS v we have spent significant time covering all the framework aspects within the documentation Here s a sneak peak of some newly added topics The fundamentals section covers the usage of IoC Container service providers and package development in depth Ace documentation is rewritten from scratch covering everything you need to know when creating custom ace commands The testing section includes documentation for browser testing via Playwright and command line testing An important thing to note is that the documentation is a reference guide explaining how the framework works and the available APIs We imagine the framework users reference documentation when they want complete information about a topic The documentation will not teach you how to build an app from scratch For that we plan to write step by step tutorials that teach you how to build a specific app using the framework In the meanwhile let us introduce you to Adocasts and AdonisJS Mastery if you want tutorial based learning content Both of these platforms have been creating content on AdonisJS for years Changes to the import module namesAs of today i e AdonisJS v you will witness many imports prefixed with the ioc keyword For example The router is imported from the ioc Adonis Core Route module and the Event emitter is imported from the ioc Adonis Core Event module The ioc keyword is a convention we follow to communicate that this import will be resolved from the IoC Container of AdonisJS When you compile your code from TypeScript to JavaScript we use a TypeScript transformer to convert this import into an IoC Container lookup method call For instance if you were importing the Route module like this import Route from ioc Adonis Core RouteThe compiled output will roughly look as follows const Route global Symbol for ioc use Adonis Core Route Taking this approach has some downsides You must always compile your code using the TypeScript official compiler because the transformer was written for tsc only The import syntax is unfamiliar to a JavaScript developer s eye Developers had to write module definitions separately from the implementation Users cannot CTRL click the import to see the implementation Starting with v we will remove ioc keyword imports with regular ESM imports and still be able to look up dependencies inside the AdonisJS dependency container Here s what the router import looks like in both v and v In v if you CTRL click on the router value you will see a standard JavaScript module resolving the singleton router instance from the IoC Container and exporting it as a variable In vimport Route from ioc Adonis Core Route In vimport router from adonisjs core services router To conclude in v there are no compiler magic converting imports to IoC Container lookup method calls Everything is straightforward and easy to reason about You can learn more about the AdonisJS IoC Container used in v from the following links IoC Container package README file An article covering Why you need an IoC container Live stream We did showcase the AdonisJS IoC Container outside of an AdonisJS app New Encryption moduleAdonisJS encryption module currently encrypts data using a single static algorithm i e aes cbc We have received a few requests to support additional algorithms in the form of drivers AdonisJS v will allow you to register custom encryption drivers and we will bundle drivers for the following encryption algorithms aes cbcaes gcmchacha poly Changes to file system naming conventionsMoving forward the AdonisJS official starter kits will use the snake case format for naming files and folders Currently in v we use lowercase names for root level directories and PascaleCase for sub directories In the JavaScript ecosystem there is no general agreement on naming conventions Some sub communities use PascalCase for files that export a class and snake case or dash case for files that export functions or objects We decided to take a simple approach and consistently name all files and folders without relying on what is exported from the file The snake case format is inspired from Dart and Google TypeScript style guide To learn more about this decision check out the article “List of rules and conventions I follow when writing code by Aman Virk Flexible stub systemThe scaffolding ace commands under the make namespace are used to create files with the initial boilerplate quickly For example You can use the make controller command to create a controller the make model command to create a model and so on Until now the templates used by these commands were within the package s source code and there was no way to customize them Moving forward with V you can eject the scaffolding templates stubs to your application codebase and modify them per your requirements Next time when you run the make commands AdonisJS will use the ejected template Here s what the controller template looks like var controllerName generators controllerName entity name var controllerFileName generators controllerFileName entity name to app httpControllersPath entity path controllerFileName import HttpContext from adonisjs core http export default class controllerName We use the generators object to define variables in the first two lines From lines we use the YAML front matter to define the destination path of the file we are about to create This will allow you to create controllers and models in any directory of your choice And finally we define the initial content of the controller New Validation LibraryThe current validation module of AdonisJS has served us well but it desperately needs some improvements Right now It lacks a union data type There is no way to validate a field as a string or a number The API to create custom rules is rough We have witnessed many individuals struggling to create custom rules The state of the package codebase was not great It made it harder for us to make big changes confidently A significant rewrite was needed Finally we developed a framework agnostic validation library called VineJS VineJS will be the official validation system for AdonisJS v VineJS is much faster than the version used in V and it s also more comprehensive It makes it easy to create custom rules schema types and validate complex schemas You can learn more about VineJS in our introduction live stream NoteYou can continue to use the existing validation module in your v projects There is no need to migrate immediately to VineJS In fact you can use VineJS and the existing validation module together in an AdonisJS application This will allow you to migrate one validator at a time Other ChangesNumerous other changes have been made for the release of AdonisJS both in the core and in some modules Following are some highlights The VSCode extension has been completely revamped to work with AdonisJS and AdonisJS It introduces new features such as Inertia support component as tag support in Edge and auto fixable issues The new core will also use the latest version of pino the logging package This allows you to make the most of worker threads to enhance performance The new router will allow you to import controllers and bind them directly to a route The string based controller reference is still there but not recommended Importing and binding controllers directly provides better type safety and refactoring capabilities The new event emitter lets you declare events with classes for better type safety and refactoring capabilities The new mail module will include drivers for sendingblue and resend All these updates are designed to help you write better more efficient and safer code with AdonisJS v The present and the futureWe have completed all the changes in the framework core and are ready to migrate official packages to work with AdonisJS v We will not introduce any breaking changes in our official packages The goal is to keep the breaking changes surface area as small as possible and help you quickly migrate your apps to v ConclusionTo conclude the goal of AdonisJS v is to remove magic and stay up to date with the language and the platform changes We want to make AdonisJS a more robust efficient and developer friendly framework Trust us we are so happy with v internally and super pumped to release it Let me share screenshots of an internal conversation we had Finally we thank everyone for using AdonisJS and for sharing their feedback Having the motivation and energy to work on the framework comes directly from all of you Your core team 2023-07-05 15:46:11
海外TECH DEV Community TrueNAS virtualization using Harvester and Kubevirt https://dev.to/hunghvu/truenas-virtualization-using-harvester-and-kubevirt-5fok TrueNAS virtualization using Harvester and KubevirtVirtualizing TrueNAS has been a common theme in the homelab world for a long time However there are not many discussions on this topic with Harvester as a hypervisor so I would like to go over my experience doing so in this article Virtual machine configuration PlanningHarvester uses Kubevirt for its virtualization management so the virtual machines are configured using a Kubevirt YAML template Before creating a virtual machine let s sketch out the configuration beforehand CPUA general recommendation is to start with vCPUs and scale them according to your workload and CPU model In my case I only use TrueNAS for archiving records so vCPUs of Ryzen G are enough for me RAMTrueNAS recommends GB at minimum and besides ZFS loves RAM I am not a ZFS expert by any means but on experimenting with an GB to GB setup I see no visible difference to my use case after GB I can technically run at GB but I decided to use GB instead to give the machine some leeway Boot drivesModern versions of TrueNAS both Scale and Core require more than GB for a boot drive GB is a good starting point For my installation I use a GB boot drive to give the OS some overhead and also create a second virtual disk to later form a mirror boot drive during TrueNAS installation Installer driveTrueNAS ISO ranges about GB or less depending on the version GB is a good starting point for an installer drive Make this one as bootOrder so the virtual machine can boot into that right away It actually does not need to be the first boot but from my experience sometimes this makes the virtual not able to detect the installer drive NetworkFor my use case I bridge the virtual machine with a LVlanNetwork so it can communicate with my infrastructure TrueNAS works well with VirtIO so use it to maximize the performance usually to times better in throughput compared to emulation Bind the virtual machine to a specific nodeTrueNAS or more likely ZFS does not like virtual IO if at all Therefore PCI passthrough is required for all data drives Enabling PCI passthrough in Harvester means your machine cannot perform a live migration so you have to schedule the VM on a specific Harvester node Side note There might be a strategy for falling back or migration between multiple virtual machines if you have identical nodes with PCI passthrough enabled I am not certain how that work at the moment Boot loader modeTrueNAS installation supports both Legacy BIOS and UEFI boot modes By default Harvester creates a virtual machine with Legacy BIOS with Secure Boot disabled UEFI boot is an option but from what in my use case it makes no difference so use the Legacy BIOS option Make sure to choose the correct installation type or else you will be greeted with Booting to hard disk stuck indefinitely YAML configurationConfigure the virtual machine via the Harvester web interface based on this specification and the final result will resemble the following template Side note This is from Edit YAML not Edit Config gt Edit as YAML I am not certain about the relationship between those two but changes in one might not reflect in the other even if they look almost identical spec affinity nodeAffinity requiredDuringSchedulingIgnoredDuringExecution nodeSelectorTerms matchExpressions key network harvesterhci io mgmt operator In values true domain cpu cores sockets threads devices disks bootOrder disk bus virtio name disk Note serial number is defined serial daeb cc ae ec fe bootOrder disk bus virtio name disk serial ecc bec d decad Note cloudinit is missing here hostDevices Note PCI devices are passed through deviceName amd com SERIES CHIPSET USB XHCI CONTROLLER name htpc deviceName amd com SERIES CHIPSET SATA CONTROLLER name htpc deviceName asmedia com name htpc inputs bus usb name tablet type tablet interfaces bridge macAddress f ac c a model virtio name br vlan lan features acpi enabled true machine type q memory guest Mi resources limits cpu memory Gi requests cpu m memory Gi evictionStrategy LiveMigrate hostname truenas core networks multus networkName default vlan lan name br vlan lan nodeSelector kubernetes io hostname htpc volumes name disk persistentVolumeClaim claimName zfs truenas core name disk persistentVolumeClaim claimName zfs truenas core Actually this template is after I finish setting up TrueNAS so it is a bit different than your brand new YAML template Let s talk about the differences Missing installer and cloudinit disksWhen the TrueNAS installer runs you will see different disks vtbd vtbd vtbd Aside from the installer there should only be drives for boot which are vtbd zfs truenas core and vtbd zfs truenas core Meanwhile the vtbd cloudinit is hidden from Harvester web GUI but is visible in the YAML config It is responsible for managing and applying a configuration in the first boot of the virtual machine After using vtbd and vtbd as boot drives installer and cloudinit becomes redundant and can cause certain issues so they are removed just in cases Drives have serial numbers The boot drives are virtual so by default they do not have associated serial numbers TrueNAS uses serial numbers as a way to keep track of drives so without the identifier certain operations such as creating a new pool are not possible at least via the web GUI even if your pool does not consist of the unidentified drive For example vtbd here is the cloudinit number changes due to different boot environments Before it is unmounted a warning is shown in TrueNAS and that prevents pool creation The same applies to the boot drives Even though they do not appear in the warning if they do not have a unique serial number no operation can be completed Harvester does not expose a mechanism to set a serial number for drives via web GUI so I manually adjust the Kubevirt YAML config and add the serial property with UUID TrueNAS is perfectly happy with that disks bootOrder disk bus virtio name disk Note serial number is defined serial daeb cc ae ec fe bootOrder disk bus virtio name disk serial ecc bec d decadPCI device devices are passed through Depending on your hardware the PCI passthrough experience might differ I did go over this a bit in my previous article on deploying an OpenWRT firewall in Harvester For my motherboard which is MSI PRO BM VC WIFI let s have a look at the block diagram below from the motherboard manual I have to pass through the section circled in green so TrueNAS can see the drives There are some rules when passing through PCI devices All devices in an IOMMU group must be passed through Their group can be determined by looking at the device address Generally devices in the same domain bus are in a group However it is best to look at sys kernel iommu groups F to access Harvester s node console to see which device belongs to which group Many times devices with different domain bus addresses can be in the same group too It is not necessary to make all passed through devices available to the virtual machine Instead some will even prevent the virtual machine to boot or causes random errors or behaviors In extreme cases a node failure may happen I guess the extreme cases happen because an errored device overwhelms the logging and I O of the node hence node failure Just make what is needed available by cherry picking them All devices in the same domain bus must be made available to the virtual machine or else it cannot boot So with that I choose the following devices all in IOMMU group But only make of them available to the virtual machine because the other two PCI devices can make my node fail The failure causes all sorts of issues like management address becoming unavailable node not responding and having to reboot etc hostDevices deviceName amd com SERIES CHIPSET USB XHCI CONTROLLER name htpc deviceName amd com SERIES CHIPSET SATA CONTROLLER name htpc deviceName asmedia com name htpc It may have been easier if I use my IBM M LSI i SAS IT mode but it makes no difference in the end for me My disks eventually look like this and the performance at default is very reasonable considering the overhead of virtualization I guess it can still be further improved Side note The test runs only a few seconds hence the skewness in its statistics That said the max throughput can reach close to Gbps at one point on a x TB SSD pool RAID Z Miscellaneous details about TrueNAS installation Standard first boot procedureWhen I first log in to TrueNAS installation there is a standard procedure I use to set the machine up Set static IP DNS and default gateway required for Internet access Install the latest update Create a client account to access a network share Move system dataset to boot pool Enable FA For the SMART tests schedule a weekly LONG test and a daily SHORT test For snapshots schedule a daily task For scrubbing schedule a weekly task Create a pool data set set user permission OPEN template enable SMB service and create a share The below are optional because they are not critical in a homelab environment but are generally a must in production Disable the root account and use an admin account instead If using SSH harden SSH authentication by disabling password login and enabling the public key requirement Set up an encrypted email notification Granularly configure alert settings Configured a verified SSL connection Schedule a replication task for a different system Schedule a cloud sync task for an off site backup strategy at minimum Modify ACL for granular access permission This system does not support virtualization errorAt Harvester v it seems virtual machines on some AMD platforms cannot detect nested virtualization This might relate to Harvester issue but that issue is categorized as a user interface bug only Besides I can run virtual machines on my Ryzen G node normally with SVM IOMMU and SR IOV enabled while sys module kvm amd parameters nested returns Up to this point in the article I have been generalizing the TrueNAS version because both Core and Scale should be relatively the same In fact my first try is to migrate my bare metal TrueNAS Scale instance It has some virtual machines and apps but the migration to Harvester virtual machine is not without an issue After the migration TrueNAS Scale virtual machines are now nested virtualization and they simply break the web GUI operations Essentially TrueNAS Scale virtual machines cannot work in my nested environment When I want to do any operation via the web GUI such as creating a new pool or new data set this error shows up and interrupts the operation However operations via shell are not affected nor are any other underlying features For example I import the pool via shell and network sharing performs without a hassle Apps also start automatically and are accessible via LAN connection but are not modifiable via TrueNAS Scale web GUI As now I use Harvester as a hypervisor type I figure TrueNAS Scale is not the most optimal choice considering its bleeding edge nature Therefore I go back to TrueNAS Core which has been battle tested in the last decade and is widely considered a feature completed by this point The TrueNAS Scale is only my playground so there is no issue for me to completely wipe it off and move to the Core I suppose a similar issue might raise again if I decide to enable virtualization on the current TrueNAS Core installation so I leave it untouched Wrap upOriginally I dedicate the whole Ryzen G node to a TrueNAS Scale bare metal installation It has no issue but is certainly not a good utilization of the hardware The current configuration makes no difference and besides it helps me learn a lot more about configuring virtual environments This labwork also makes me recognize one important thing Searching for Harvester information is not always the way to go This is because Harvester consists of many different components such as the underlying Linux OS Kubernetes Kubevirt Longhorn and so on When I face issues with virtual machines it is better to search for the answer in Kubervirt context like XYZ error in Kubevirt not XYZ error in Harvester That s all for now I wonder what would be a fun topic to learn about next This article was originally published at Virtualize TrueNAS with Harvester and Kubevirt for VM management If you find this article to be helpful I have some more for you Is Harvester a good hypervisor for a beginner My hands on experienceDeploy a virtualized OpenWRT firewall in Harvester how did it go Is AMD GPU better than Nvidia on Linux It depends And let s connect LinkedInGitHubTwitter 2023-07-05 15:42:02
海外TECH DEV Community Understanding JWTs: A Simple Guide for Beginners https://dev.to/philip-ainberger/understanding-jwts-a-simple-guide-for-beginners-aba Understanding JWTs A Simple Guide for Beginners What is a JWT JWT short for JSON Web Tokens is a compact URL safe way of representing claims information to be transferred between two parties the client and server Think of it like a secret message in the form of a cryptographically signed note which can only be understood by the intended recipient Structure of a JWTA JWT has three distinct parts each separated by a dot Header It contains metadata about the token and the cryptographic algorithm used usually HMAC SHA or RSA Payload The actual data that the token carries is stored here It s also known as the claims and can include data like user details and additional metadata Signature The signature is a cryptographically secured proof that verifies the sender and ensures the message wasn t altered during transit How Does a JWT Work Here s the play by play of JWT in action A client logs in using their credentials sending a request to the server The server verifies these credentials If they re valid the server generates a JWT and sends it back to the client The client stores the JWT usually in local storage and includes it in every subsequent HTTP request s header The server upon receiving these requests verifies the JWT If it s valid the client is authenticated and authorized Why Use JWT JWTs are universal any programming language can generate a JWT because they re essentially JSON Also they facilitate maintaining session state on the client reducing server load which is more scalable Security ConsiderationsWhile JWTs are handy they do come with some vulnerabilities Token Theft JWTs are stored on the client side and hence can be stolen Always ensure your transmission is secure preferably via HTTPS No In built Invalidity Mechanism JWTs can t be invalidated individually or in a group from a user due to their stateless nature Token Size Storing too much data in a JWT can make it heavy affecting network performance Algorithm Vulnerabilities Some algorithms in the JWT header are vulnerable to attacks Always use secure and updated algorithms and treat your signing keys like secrets In conclusion JWTs are a potent tool in web development providing stateless secure and scalable communication Remember how effectively you wield JWTs in your application depends on your specific needs and the level of security you require I hope this gives you a better understanding of JWTs Feel free to share your thoughts 2023-07-05 15:40:59
海外TECH DEV Community Displaying your full-sized YouTube thumbnail or a custom OG image in a Twitter card https://dev.to/philhawksworth/displaying-your-full-sized-youtube-thumbnail-or-a-custom-og-image-in-a-twitter-card-g0h Displaying your full sized YouTube thumbnail or a custom OG image in a Twitter cardIn days past links to YouTube videos on Twitter used to show a nice full sized thumbnail image You could specify the poster image you wanted over in YouTube and it would appear along with an embedded video player These days links to YouTube videos have been downgraded to only show a small image card which is frustrating for anyone wanting to share their videos on Twitter with a visible and inviting call to action to watch them In an effort to make their videos stand out and attract clicks again some have taken to attaching a thumbnail images directly to their tweets which while making them visually appealing get in the way of click throughs as people find themselves just seeing a larger version of the image rather than viewing the video We can fix this with a crafty use of Netlify s Edge Functions How I enriched my link shortenerFor some time I ve been using Netlify s redirects API to make my own simple link shortener It lets me create short URLs for sharing resources using a domain that I own and the knowledge that I don t need to depend on a third party link sharing service You can read about that in this blog post I wrote explaining it including a handy little utility Kent C Dodds wrote to expand on this technique Also see Kent s video explainer for even more background info These days I use it in combination with a little Raycast script to make creating new URLs a snap Having a link shortener like this provides a nice opportunity It offers the chance to add some logic to customise what everyone and everything that follows those links will see So rather links to YouTube videos unfurling in Twitter like this They can look like this How to offer a different view to crawlers and unfurlersWhen you share a link on Twitter and on other tools and social networks they visit the URL and unfurl it in order to display a preview of what can be found there We can give services like this hints about what we d like them to show using metatags in the head of our HTML Since Netlify introduced Edge Functions we ve had an ideal way to add a tiny bit of logic into our link shortener which will return a page template of our own to anything looking to unfurl the URL to display its opengraph image How to detect if Twitter is visiting your URLWhile serving different experiences to visitors based on their brand of browser is generally understood to be a bad idea and we should instead use feature detection if we are trying to work around differences in browser support for features we need here it is the ideal match for our needs So we can use UserAgent sniffing to decide if we should just redirect the visitor to the page our short URL points at or to show our own custom page instead The code to do this in a netlify Edge Function is nice simple JavaScript or TypeScript if you prefer Detecting if Twitter is the requesting user agentconst agent request headers get user agent if agent includes Twitter Got something just for you Twitter The URL we shared with Twitter is not a YouTube domain it is on our custom domain so Twitter won t automatically impose its own decisions about defaulting to a mini card All we need to do is show it an HTML page with the appropriate opengraph data which we can automatically get from the YouTube page that we re pointing at To do this our edge function fetches the open graph data from the destination URL fetching the open graph data from the destination page and rendering it in a template Import Cheerio for easy DOM interrogationimport as cheerio from rc get the og data from the final destination page via our redirect lookupconst destination await fetch url pathname const html await destination text const cheerio load html Grab some OG data from the siteconst title meta property og title attr content const description meta property og description attr content const site meta property og site name attr content const orginal image meta property og image attr content Now we have the open graph data from the destination page we can use it in our own page template to render our custom view when a request is made with Twitter s user agent string Our page template Just a string literal into which we can poke some variablesimport page from og page js Populate our OG page template and return it as HTMLconst ogPage page site site title title description description path url pathname domain rootDomain orginal image site YouTube orginal image null return new Response ogPage headers content type text html The resultsNow just by making a convenient short link to any YouTube when we share that link on Twitter it will display the large format image card within the tweet but anyone clicking that preview card or following the link directly will be taken to the video on YouTube Nice Bonus How to show custom OG images for third party URLsThere s more Now that we have this logic which displays a custom page view to Twitter we can use it to show any OG image we like and not just relay the one specified at the destination URL This lets us use our own branding when we share a shortened link on Twitter By expanding the list of user agent strings that we detect we can add the same support for other places that unfurl URLs to show a preview image like Slack Mastodon LinkedIn and others A few more lines of logic in our function and we can populate our custom template with our own OG image if we have one that matches the path in our short link If not not problem just show the one intended by the owners of the destination page I ve used this to add my own OG image when the link I m sharing doesn t have one of its own or I ve wanted to enhance it for my own purposes like this one below Try it for yourselfYou can experiment with this without needing to buy a domain or pay for anything Try deploying this demo repo to Netlify to get a your own URL shortener including the edge function which detects unfurlers and renders its custom template It also includes Kent s netlify shortener utility script which has instructions on how to add a system wide command to quickly shorten links for you The hardest part Thinking of a good short domain that you can register to use as your own short code domain You can register domains directly at Netlify too if you want to do the whole thing ResourcesLink shortener with custom OG image support GitHub repo Automatically clone the repo and deploy to NetlifyKent C Dodd s Netlify Shortener helperHow to add a Raycast script to make a new short linkCustom domains on NetlifyHow my findthat at link shortener works 2023-07-05 15:19:00
海外TECH DEV Community Getting Back to Coding with Learning and Building in Public https://dev.to/adiatiayu/getting-back-to-coding-with-learning-and-building-in-public-44io Getting Back to Coding with Learning and Building in PublicHello Friends It has been so many moons since my last blog post and since I did coding Life came in between and I had to focus on that first for my mental health s sake It s still lingering but I m in a much better state now So I m slowly making my way back to coding and writing And I need to hold myself accountable together with you all How would I do that Learning in PublicLearning in public is when we learn something and share what we ve learned with others through content creation blog posts videos etc or simply post them on social media like Twitter LinkedIn etc I ve been learning in public for a while I wrote many blog posts about anything that I learned They re not only technical concepts but also other experiences and things in the tech industry that interest me like tech communities and open source Learning in public has been giving me many great lessons and benefits And some of them are It helps the future me I often look back at my previous posts when I get stuck in something knowing I ve written a post about it It motivates me to keep learning and sharing my knowledge with others It helps me a lot in holding myself accountable It gives me a chance to learn together with others and make friends We can make mistakes or need to clarify whatever things we explain and people would give us feedback I learn and grow much more from the feedback And from there I get to know more developers and tech writers and we become friends The more I share the more I learn how to communicate better Now I m able to explain complicated concepts in a more simple way that can be understood by beginners  I guess being a non native English speaker has become one of my advantages Because I usually can t understand something just by reading the docs in one go I need to read it repeatedly translate words I don t understand read other blog posts and sometimes watch tutorial videos But through this process I learned much more And most of the time that s when I can finally know how to explain things If you want to learn in public I don t have any other advice than just starting it Don t be afraid of making mistakes Mistakes and experiences are great teachers in life We can always learn from our mistakes to grow and be better I highly recommend this article  Learn In Public by Swyx to motivate you to learn in public Building in PublicBuilding in public is when we create an app website or anything else and share the progress with the public It can be through blog posts video content or sharing on social media I never do building in public And I have to admit I have many unfinished projects 🥲 The Month of Building in PublicI m part of the Virtual Coffee community And building in public is the theme of this month s challenge And this challenge is open to everyone You can read this article to participate Although it fears me I m taking part in this challenge So let s do it together I need a portfolio website and I want to learn NextJS So I will start building it with NextJS and style it with Tailwind My Goal for the Monthly ChallengeI need to set achievable goals that I can accomplish at the end of the month As my daughter will start her summer holiday next week and we will be on vacation for a few weeks these goals must be realistic because I won t have time to code during the day So here are my goals Prepare the environment install NextJS and TailwindCreate a navbar and a footerCreate About Me and Contact Me pagesBasic stylingI know it sounds like nothing but this will be more than just a building in public for me It will also be learning new things in public If I can achieve these goals before the end of the month then I will add more Final WordsGetting back to coding learning and writing after being away for so long takes work It feels like I forget many things already But I m ready to get back on track with the help of learning and building in public So who s with me Cover photo credit Nik on UnsplashThank you for reading Last you can find me on Twitter Mastodon and BlueSky 2023-07-05 15:13:41
海外TECH Engadget The modular Fairphone 4 arrives in the US for the first time https://www.engadget.com/the-modular-fairphone-4-arrives-in-the-us-for-the-first-time-155721165.html?src=rss The modular Fairphone arrives in the US for the first timeFairphone is at long last bringing its sustainability focused smartphones to the US The company has teamed up with Murena to start offering a version of the Fairphone in the country The Murena Fairphone is available to order now It starts at for GB of RAM and GB of storage according to the Murena store A variant with GB of RAM and GB of storage will run you Storage is expandable via microSD Those prices might seem fairly steep for a two year old device with a mid range Qualcomm chip from but the Murena Fairphone is about much more than the pure specs For one thing it s a privacy centric device with a version of Android that s detangled from Google Murena s e operating system eschews Google s stock apps For instance rather than Google Maps you ll get an open source alternative by default The device has its own directory that gives each app a privacy rating As such you ll have some information about how each app tracks your data before you install one You can still install Google built apps Murena purports to snag apps from the Play Store without directing your information to Google You can install a standard version of Android if you like but Murena warns that this will void your warranty For what it s worth Fairphone buyers in Europe can opt to have either stock Android or e out of the box Murena plans to provide software updates and security patches for at least five years while Fairphone offers a five year hardware warranty Fairphone s ethos centers around repairability and as such the smartphone is designed to be long lasting The Fairphone has a out of repairability score from iFixit It has a modular design and it s said to be the first such phone with an IP rating of IP That means the phone should be protected from dust and rain None of the components are glued together and you can use a regular screwdriver to swap them out The Murena Fairphone has a mAh battery as well as G and dual SIM support On the camera front you ll get a dual MP rear camera and MP selfie camera The device s body camera array loudspeaker USB C port and inch display are all individual parts and you ll be able to buy replacements from Murena Meanwhile the Murena Fairphone doesn t come with a USB cable power adapter or headphones in the box Murena sells those separately as it encourages buyers to use cables and adapters they might already have stuffed in a drawer somewhere Although the device is unlocked T Mobile and mobile virtual network operators that use the T Mobile network are the only recommended carriers for it in the US Fairphone is framing the device s US debut as a pilot as the company is primarily focused on the European market quot This collaboration with e OS is a great opportunity for us to pilot selling devices in the US market with a long standing partner and learn more about the American market quot Fairphone CEO Eva Gouwens told Engadget in a statement This article originally appeared on Engadget at 2023-07-05 15:57:21
海外TECH Engadget Amazon's Echo Dot drops to an all-time low of $23 in early Prime Day deal https://www.engadget.com/amazons-echo-dot-drops-to-an-all-time-low-of-23-in-early-prime-day-deal-153021785.html?src=rss Amazon x s Echo Dot drops to an all time low of in early Prime Day dealAmazon Prime Day is upon us and with it comes great deals on many of our favorite smart home devices including already well priced speakers We re big fans of Amazon s Echo Dot recently naming its fifth generation the best smart speaker available for under and now it s at an all time low of This percent discount brings one of the most affordable smart speakers on the market down to a small fraction of what its competitor s cost Amazon released the Echo Dot fifth gen last year with improved sound quality compared to previous models It plays Amazon Music Spotify and Apple Music has Alexa on hand to answer any questions or tell you the weather and comes with a mic off button for when you don t want her listening nbsp Echo Dots are compatible throughout your home making them ideal for parties or larger spaces They can also sync with your Fire TV and create a home theater system of sorts Since the current discount lets you buy two for the price of one with a few dollars for movie snacks left over it s worth thinking about whether you want a more expansive sound nbsp If you re looking for a smart speaker for a more compact space ーand to save a little more money ーAmazon s Echo Pop is also touting a big markdown for Prime Day with a percent discount bringing the speaker from to The new arrival has a front facing speaker and can lose a little bit of sound quality at high volumes but other than a few different color options it doesn t vary too much from its sibling nbsp Your Prime Day Shopping Guide See all of our Prime Day coverage Shop the best Prime Day deals on Yahoo Life Follow Engadget for the best Amazon Prime Day tech deals Learn about Prime Day trends on In the Know Hear from Autoblog s car experts on must shop auto related Prime Day deals and find Prime Day sales to shop on AOL handpicked just for you This article originally appeared on Engadget at 2023-07-05 15:30:21
Cisco Cisco Blog Biggest Entertainers Trust Rock Lititz: They Trust Cisco https://feedpress.me/link/23532/16223646/biggest-entertainers-trust-rock-lititz-they-trust-cisco Biggest Entertainers Trust Rock Lititz They Trust CiscoRock Lititz is a state of the art campus where the music industry perfects their live performances Located a couple hours outside of Philadelphia this incredible campus is innovating and transforming the concert and festival experience globally with a robust Cisco network at the heart of it all 2023-07-05 15:22:37
金融 金融庁ホームページ 国際金融センター特設ページを更新しました。 https://www.fsa.go.jp/policy/financialcenter/index.html 金融センター 2023-07-05 17:00:00
ニュース BBC News - Home Wimbledon 2023: Just Stop Oil protesters interrupt play twice at All England Club https://www.bbc.co.uk/sport/tennis/66041547?at_medium=RSS&at_campaign=KARANGA confetti 2023-07-05 15:49:12
ニュース BBC News - Home Rishi Sunak pressing ahead with bill to curb small boats https://www.bbc.co.uk/news/uk-politics-66113300?at_medium=RSS&at_campaign=KARANGA migration 2023-07-05 15:03:38
ニュース BBC News - Home Taylor Swift's Eras tour: Tips for getting tickets as new dates announced https://www.bbc.co.uk/news/entertainment-arts-66108206?at_medium=RSS&at_campaign=KARANGA glastonbury 2023-07-05 15:36:31
ニュース BBC News - Home Wimbledon 2023: Jodie Burrage loses to Daria Kasatkina, Arthur Fery beaten by Daniil Medvedev https://www.bbc.co.uk/sport/tennis/66112296?at_medium=RSS&at_campaign=KARANGA Wimbledon Jodie Burrage loses to Daria Kasatkina Arthur Fery beaten by Daniil MedvedevBritain s Jodie Burrage looks overcome by nerves as her Wimbledon Centre Court debut ends in a crushing defeat by Russian th seed Daria Kasatkina 2023-07-05 15:25:01
ニュース BBC News - Home Wimbledon 2023: Daria Kasatkina cruises past GB's Jodie Burrage on Centre Court https://www.bbc.co.uk/sport/av/tennis/66111117?at_medium=RSS&at_campaign=KARANGA Wimbledon Daria Kasatkina cruises past GB x s Jodie Burrage on Centre CourtWatch the best shots as Britain s Jodie Burrage loses her Centre Court debut to th seed Daria Kasatkina in the second round at Wimbledon 2023-07-05 15:04:29
ニュース BBC News - Home Tour de France: Jai Hindley wins stage five to take yellow jersey https://www.bbc.co.uk/sport/cycling/66113182?at_medium=RSS&at_campaign=KARANGA Tour de France Jai Hindley wins stage five to take yellow jerseyAustralian Jai Hindley wins stage five of his debut Tour de France to take the overall leader s yellow jersey from Britain s Adam Yates 2023-07-05 15:47:10
Azure Azure の更新情報 Public preview: Sensitive Data Protection for Application Gateway Web Application Firewall logs https://azure.microsoft.com/ja-jp/updates/public-preview-sensitive-data-protection-for-application-gateway-web-application-firewall-logs/ Public preview Sensitive Data Protection for Application Gateway Web Application Firewall logsProtect the sensitive data getting stored in your Web Application Firewall WAF logs using log scrubbing on Azure s regional Web Application Firewall running on Application Gateway 2023-07-05 16:00:03
GCP Cloud Blog Modernizing telecommunications and keeping the UK connected https://cloud.google.com/blog/topics/telecommunications/virgin-media-and-o2-migrate-to-google-cloud/ Modernizing telecommunications and keeping the UK connectedWhen Virgin Media and O joined forces in June we made it our mission to modernize the country s connectivity By the end of that year we had completed upgrading our fixed broadband network with download speeds of at least one gigabit per second supporting the UK government s drive to take gigabit broadband nationwide by Gigabit downloads would allow a high definition film to be downloaded in under a minute As we continue with our rollout of our G mobile networks we are not only simplifying connectivity for our million customers but helping to revitalize the UK economy by connecting individuals businesses and communities up and down the country  Modernizing a nation s telecommunications means we need to be a modern data driven company But the tech stacks of both Virgin Media and O were built on a complicated patchwork of legacy systems inherited from companies they had absorbed throughout their history So when the time came to merge the two businesses architecture it was clear that to integrate our systems and get the most from our vast data pools we needed to do so in the cloud Our migration to Google Cloud gave us a fresh start to use its intuitive solutions which suited our needs to build a new infrastructure in a fast and cost efficient way At the heart of that new build was our data architecture which would enable us to transform our organization from a traditional telecommunications business to the st century tech company our customers demanded  The challenge of data analysis without dataAs data analysts our goal is to use the data at our disposal to gather insights to increase efficiency target customers and improve our products However we don t always have a precise question in mind from the outset We come to the data with high level problems we want to explore we ask a question get an answer and then refine our journey from there Iteration is the key  Before we migrated to Google Cloud iteration was impossible Each query took hours to process which meant that refining a simple question would have taken days or even weeks assuming we hadn t lost our train of thought along the way Add to that the fact that our overnight jobs began at pm effectively killing off all open queries and it s clear how limited we were in being able to take data driven decisions We were unable to segment customers to personalize our offering In the event of outages on the broadband network it took us hours to understand what the problem was and then a six month lead time to correct any algorithms in our modeling We realized that if we wanted to revolutionize the telecommunications industry we would first have to revolutionize our own business  Illuminating a path to powerful insights with Google CloudMigrating our data to Google Cloud has been like switching on the lights in a dark room Now when we want to know something about our business with some of the query execution time reduced from hours to seconds we can refine our way to valuable insights within hours if not minutes instead of days or weeks What s more the average time for manual testing is now four minutes as opposed to days while we experience almost no monthly downtime for our data analytics applications as opposed to the two hours a month we were used to And because Google Cloud feels like a tool that has been built for analysts it allows us to use the data in a more agile manner Working together in the cloud our analysts and technical teams are able to react quickly to our business needs and get powerful insights into the hands of our commercial teams when they need them  With most of our data from the broadband and mobile operations now unified in Google Cloud we are able to build rich profiles of our customers showing us how to target new customers and personalize our product offering to existing ones And with data unified across domains we are able to understand how a customer s experience with for example their broadband service might affect say their decision to renew their contract   In terms of our network monitoring we have reduced the lead time for changes to our network model algorithms from six months to minutes This allows us to continually model any changes to the network before implementing them Our network monitoring is now widely recognised as being far ahead of the industry standard and it s all thanks to our ability to use our data in Google Cloud to iterate at speed  Preventing carbon emissions with BigQuery and VertexAIGoogle Cloud has also enabled us to use our data to reduce our carbon emissions Every time our network engineers are needlessly sent out to fix a fault in the network Pub Sub ingests both the network data and the engineer s analysis into BigQuery With the help of VertexAI and Looker we are then able to model that data to understand and eliminate these unnecessary callouts reducing our carbon emissions and saving us hundreds of thousands of pounds per year in wasted journeys A modern business for st century connectivityThe next phase of our data transformation is our data democratization program which aims to put all this valuable data directly into the hands of the business departments that need it enabling them to self serve insights quickly and easily to empower informed business decisions This is an essential part of our journey to becoming the modern telecommunications company that we want to be where data underpins every decision we make As our migration journey nears completion we have already experienced a major transformation in the way we operate but we expect the next year to be even more impactful for both the business and our customers One project in the pipeline is our plan to incorporate large language models into our customer service chatbots by leveraging all our existing data from previous customer interactions Again this would previously have been impossible but with Google Cloud we will be able to use this data to greatly improve the customer experience  As data continues to transform our business we are excited by the ways we will be able to keep modernizing the UK and continue connecting our customers long into the future 2023-07-05 16:00:00

コメント

このブログの人気の投稿

投稿時間:2021-06-17 22:08:45 RSSフィード2021-06-17 22:00 分まとめ(2089件)

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

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