<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Mehmet Akkuş on Medium]]></title>
        <description><![CDATA[Stories by Mehmet Akkuş on Medium]]></description>
        <link>https://medium.com/@mehmetakkus?source=rss-56a60960351f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*5Q22mmIGfa7sZOzwnKvIuw.jpeg</url>
            <title>Stories by Mehmet Akkuş on Medium</title>
            <link>https://medium.com/@mehmetakkus?source=rss-56a60960351f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 20:04:44 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mehmetakkus/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[AI Ajanlarını Sunucuya Bağlarken Şifre Vermek İstemiyorsak]]></title>
            <link>https://mehmetakkus.medium.com/ai-ajanlar%C4%B1n%C4%B1-sunucuya-ba%C4%9Flarken-%C5%9Fifre-vermek-i%CC%87stemiyorsak-532677722eba?source=rss-56a60960351f------2</link>
            <guid isPermaLink="false">https://medium.com/p/532677722eba</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[ssh-keygen]]></category>
            <dc:creator><![CDATA[Mehmet Akkuş]]></dc:creator>
            <pubDate>Fri, 06 Nov 2026 23:34:41 GMT</pubDate>
            <atom:updated>2026-11-06T23:34:41.167Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1ZEZnbbrd7pK8WNZFUTmKw.png" /><figcaption>AI generated image</figcaption></figure><p>Süreçlerimiz’in birçoğu AI etrafında şekillenmişken zaman zaman sunuculara da yapay zeka ajanlarını bağlıyoruz. Peki şifreleri açık bir şekilde paylaşmak istemiyorsak? Eğer bunu gereksiz buluyorsanız muhtemelen endişe edilecek bir şey yaşamadınız umarım yaşamazsınız.</p><p>Bir gün ansızın sisteminizde kontrolünüz dışında işler yapılırsa ve bu isteklerin/işlemlerin nereden geldiğini anlam veremiyorsanız şüpheleriniz oluşursa belki sizin için de faydalı bir not olabilir.</p><p>Gelelim konumuza sistemlere terminalden şifresiz bağlanalım ve AI araçlarından sadece terminalden IP ile bağlanmasını sağlayalım en azından bir miktar daha güvenlik sağlayabiliriz. Eğer çok fazla sunucular ile haşır neşirseniz günlük hayatta da zaten kullandığımız bir flow.</p><pre># 1. Kendi PC terminalinizde SSH Key oluşturun<br>ssh-keygen -t ed25519 -f ~/.ssh/server_ed25519 -C &quot;mac-to-linux&quot;<br><br># 2. Public Key&#39;i kopyala (veya cat ile görüntüleyebiliriz)<br>pbcopy &lt; ~/.ssh/server_ed25519.pub<br><br># 3. Public Key&#39;i uzak sunucuya ekle (en alta yapıştır)<br>nano /root/.ssh/authorized_keys<br><br># 4. LINUX Dosya izinlerini düzenle<br>chmod 700 /root/.ssh<br>chmod 600 /root/.ssh/authorized_keys<br><br># 5. MAC: Key passphrase&#39;ini macOS Keychain&#39;e kaydet<br>ssh-add --apple-use-keychain ~/.ssh/server_ed25519<br><br># 6. Kendi PC&#39;nizde SSH Config dosyasını aç<br>nano ~/.ssh/config<br><br># Aşağıdaki satırları config dosyasına ekle:<br># Host ve HostName değerlerini gerçek IP ile değiştir.<br><br># Host SUNUCU_IP<br>#     HostName SUNUCU_IP<br>#     User root<br>#     IdentityFile ~/.ssh/server_ed25519<br>#     IdentitiesOnly yes<br>#     AddKeysToAgent yes<br>#     UseKeychain yes<br><br># Şifresiz bağlantıyı test et<br>ssh SUNUCU_IP</pre><blockquote>Yapay zekânız bol, doğal zekânız daim olsun.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=532677722eba" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[API’den Yazıcıya: NuxPrint ile Bulut Üzerinden Kolay Yazdırma]]></title>
            <link>https://mehmetakkus.medium.com/apiden-yaz%C4%B1c%C4%B1ya-nuxprint-ile-bulut-%C3%BCzerinden-kolay-yazd%C4%B1rma-f58704c99d1b?source=rss-56a60960351f------2</link>
            <guid isPermaLink="false">https://medium.com/p/f58704c99d1b</guid>
            <category><![CDATA[cloud-print]]></category>
            <category><![CDATA[nuxprint]]></category>
            <dc:creator><![CDATA[Mehmet Akkuş]]></dc:creator>
            <pubDate>Wed, 02 Sep 2026 07:31:01 GMT</pubDate>
            <atom:updated>2026-09-02T07:31:01.684Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZLCw9YLxcF2YN1awbcyKWA.jpeg" /><figcaption>nuxprint.com</figcaption></figure><p>Web uygulamalarında fatura, fiş, kargo etiketi veya rapor oluşturmak oldukça kolaydır. Asıl problem, bulutta çalışan uygulamanızdan ofiste, mağazada veya depoda bulunan fiziksel bir yazıcıya otomatik olarak çıktı göndermektir. NuxPrint, tam olarak bu problemi çözmek için geliştirilmiş bir bulut yazdırma altyapısı hadi detaylara bakalım..</p><h3>Bulut Yazdırma Nedir?</h3><p>Bulut yazdırma, uygulamanızın yazıcıyla doğrudan aynı ağda olmasına gerek kalmadan internet üzerinden yazdırma işlemi gerçekleştirmesini sağlar.</p><p>NuxPrint’te temel yapı şu şekildedir:</p><pre>Web Uygulaması<br>      ↓<br>NuxPrint API<br>      ↓<br>NuxPrint Agent<br>      ↓<br>Yerel Yazıcı</pre><p>NuxPrint Agent, yazıcının bağlı olduğu bilgisayara kurulur. USB, ağ veya sistemde tanımlı yazıcıları algılar ve NuxPrint hesabınızla eşleştirir.</p><p>Böylece bulutta çalışan uygulamanız, yerel ağdaki yazıcıya doğrudan erişmek zorunda kalmaz.</p><h3>NuxPrint Nasıl Kullanılır?</h3><p>Kurulum temel olarak dört adımdan oluşur:</p><ol><li>NuxPrint hesabı oluşturun.</li><li>Yazıcının bağlı olduğu bilgisayara NuxPrint Agent’ı kurun.</li><li>API üzerinden kullanılabilir yazıcıları listeleyin.</li><li>İlgili yazıcıya bir print job gönderin.</li></ol><p>Yazıcıları API üzerinden listeleyebilirsiniz:</p><pre>GET /api/printers</pre><p>Her yazıcının kendine ait bir externalId değeri bulunur. Bu değer çıktı gönderirken printerId olarak kullanılır.</p><p>Örneğin:</p><pre>{<br>  &quot;printerId&quot;: &quot;847291&quot;,<br>  &quot;documentName&quot;: &quot;invoice.pdf&quot;,<br>  &quot;documentType&quot;: &quot;pdf&quot;,<br>  &quot;documentData&quot;: &quot;BASE64_DATA&quot;,<br>  &quot;copies&quot;: 1<br>}</pre><p>Bu veri:</p><pre>POST /api/print-jobs</pre><p>endpoint’ine gönderildiğinde belge seçilen yazıcıya iletilir.</p><h3>Node.js ile Basit Bir Örnek</h3><pre>import fs from &quot;fs&quot;;<br>import axios from &quot;axios&quot;;<br><br>const pdf = fs.readFileSync(&quot;./invoice.pdf&quot;);<br>await axios.post(<br>  &quot;https://nuxprint.com/api/print-jobs&quot;,<br>  {<br>    printerId: &quot;847291&quot;,<br>    documentName: &quot;invoice.pdf&quot;,<br>    documentType: &quot;pdf&quot;,<br>    documentData: pdf.toString(&quot;base64&quot;),<br>    copies: 1<br>  },<br>  {<br>    headers: {<br>      &quot;X-API-Key&quot;: process.env.NUXPRINT_API_KEY<br>    }<br>  }<br>);</pre><p>Artık kullanıcı tarafındaki süreç:</p><pre>&quot;Faturayı Yazdır&quot;<br>       ↓<br>PDF oluşturulur<br>       ↓<br>NuxPrint API&#39;ye gönderilir<br>       ↓<br>Yazıcı otomatik olarak çıktıyı verir</pre><p>Kullanıcının PDF indirmesine, dosyayı açmasına veya tarayıcıdaki yazdırma ekranıyla uğraşmasına gerek kalmaz.</p><h3>Nerelerde Kullanılabilir?</h3><p>NuxPrint yalnızca standart PDF yazdırmak için kullanılmaz. PDF’in yanında ZPL, EPL, ESC/POS ve RAW yazdırma gibi farklı formatlar da desteklenebilir.</p><p>Bu nedenle özellikle şu sistemlerde kullanılabilir:</p><ul><li>POS ve restoran sistemleri</li><li>Fatura ve muhasebe uygulamaları</li><li>E-ticaret sistemleri</li><li>Kargo etiketi yazdırma</li><li>Depo ve lojistik uygulamaları</li><li>ERP sistemleri</li><li>Çok şubeli SaaS uygulamaları</li></ul><p>Örneğin bir restoran siparişi geldiğinde müşteri fişini kasadaki yazıcıya, sipariş detaylarını ise mutfak yazıcısına otomatik olarak gönderebilir.</p><h3>Sonuç</h3><p>Cloud printing’in en önemli avantajı, bulut uygulaması ile fiziksel yazıcı arasındaki ağ problemini ortadan kaldırmasıdır.</p><p>NuxPrint sayesinde uygulamanızın yazıcının nerede olduğunu veya hangi yerel ağda bulunduğunu bilmesine gerek kalmaz.</p><p>Uygulamanız yalnızca API’ye: <strong>“Bu belgeyi şu yazıcıdan yazdır.” </strong>der.</p><p>Gerisini NuxPrint ve yerel Agent gerçekleştirir.</p><p>Böylece klasik:</p><pre>Dosyayı oluştur → İndir → Aç → Yazıcı seç → Yazdır</pre><p>akışı yerine:</p><pre>İşlem → API → Yazıcı</pre><p>şeklinde tamamen otomatik bir yazdırma altyapısı oluşturabilirsiniz.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f58704c99d1b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From API to Printer: A Practical Guide to Cloud Printing with NuxPrint]]></title>
            <link>https://mehmetakkus.medium.com/from-api-to-printer-a-practical-guide-to-cloud-printing-with-nuxprint-93ed39bab771?source=rss-56a60960351f------2</link>
            <guid isPermaLink="false">https://medium.com/p/93ed39bab771</guid>
            <category><![CDATA[printing]]></category>
            <category><![CDATA[print]]></category>
            <category><![CDATA[cloud-printing]]></category>
            <category><![CDATA[nuxprint]]></category>
            <dc:creator><![CDATA[Mehmet Akkuş]]></dc:creator>
            <pubDate>Wed, 02 Sep 2026 05:26:01 GMT</pubDate>
            <atom:updated>2026-09-02T05:26:01.128Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZLCw9YLxcF2YN1awbcyKWA.jpeg" /><figcaption>nuxprint.com</figcaption></figure><h3>From API to Printer: A Practical Guide to Cloud Printing with NuxPrint</h3><p>Building a web application that generates invoices, receipts, shipping labels, or reports is relatively straightforward.</p><p>Printing them is where things get complicated.</p><p>Your application may be running on AWS, Azure, a VPS, or another cloud environment, while the printer is connected to a computer inside an office, restaurant, warehouse, or retail store.</p><p>The cloud application cannot simply access a USB printer connected to a local machine.</p><p>This is exactly the problem cloud printing is designed to solve.</p><p>With NuxPrint, you can create a bridge between your cloud-based application and printers connected to local computers, then send print jobs programmatically through an API.</p><p>In this guide, we’ll look at how cloud printing works, how NuxPrint connects cloud applications to local printers, and how you can send your first print job through the API.</p><h3>The Problem with Printing from Web Applications</h3><p>Consider a typical SaaS application.</p><p>A user clicks:</p><p><strong>Print Invoice</strong></p><p>Your backend generates a PDF.</p><p>But what happens next?</p><p>In many applications, the workflow looks like this:</p><ol><li>Generate the document.</li><li>Download the PDF.</li><li>Open the file.</li><li>Select a printer.</li><li>Click Print.</li></ol><p>That may be acceptable when printing occasionally.</p><p>But it quickly becomes inefficient when printing is part of a business workflow.</p><p>Imagine a restaurant receiving hundreds of orders, a warehouse generating shipping labels, or a retail application printing receipts throughout the day.</p><p>You don’t want employees manually downloading and opening documents every time something needs to be printed.</p><p>Instead, the application should be able to say: <em>Send this document to that printer. </em>And the printer should simply print it.</p><h3>What Is Cloud Printing?</h3><p>Cloud printing allows an application or device to send print jobs to a printer over the internet rather than requiring the application to communicate directly with the printer.</p><p>This makes it possible to initiate printing from computers, mobile devices, POS systems, and cloud-hosted applications, even when the printer itself is located somewhere else.</p><p>The key concept is simple:</p><p><strong>Your application does not need direct network access to the printer.</strong></p><p>Instead, a local agent communicates with the printer while a cloud service coordinates print jobs.</p><p>In the case of NuxPrint, the architecture looks roughly like this:</p><pre>Your Web Application<br>        |<br>        | REST API<br>        v<br>     NuxPrint<br>        |<br>        | Internet<br>        v<br> NuxPrint Agent<br>        |<br>        +------ USB Printer<br>        |<br>        +------ Network Printer<br>        |<br>        +------ Thermal / Label Printer</pre><p>The NuxPrint Agent runs on a computer that already has access to the printers.</p><p>Your application communicates with the NuxPrint API.</p><p>The Agent handles the local printer communication.</p><p>This separation makes cloud printing particularly useful for applications where the server and printer exist in completely different network environments.</p><h3>Why Use a Cloud Print API?</h3><p>The biggest advantage is automation.</p><p>Instead of relying on users to download files and manually print them, your application can trigger printing as part of a workflow.</p><p>For example:</p><h3>Restaurants</h3><p>A new online order could automatically send:</p><pre>Customer Receipt → Cashier Printer<br>Kitchen Order    → Kitchen Printer</pre><h3>E-commerce</h3><p>When an order is prepared:</p><pre>Invoice        → Office Printer<br>Shipping Label → Warehouse Label Printer</pre><h3>Retail</h3><p>A POS application could automatically send receipts to the appropriate thermal printer.</p><h3>Multi-branch Businesses</h3><p>A central application could manage printers located across multiple offices or stores without requiring direct network connectivity between the application server and each printer.</p><p>Cloud printing is commonly used in environments such as offices, restaurants, retail businesses, schools, warehouses, and organizations operating multiple locations.</p><h3>Getting Started with NuxPrint</h3><p>The NuxPrint integration can be broken down into four main steps:</p><pre>1. Create your account<br>2. Install the NuxPrint Agent<br>3. Discover your printers<br>4. Send print jobs through the API</pre><p>Let’s go through each one.</p><h3>Step 1: Create a NuxPrint Account</h3><p>First, create a NuxPrint account.</p><p>Your account gives you access to the NuxPrint dashboard and the credentials required to communicate with the API.</p><p>API requests can be authenticated using an API key through the X-API-Key header or using JWT Bearer authentication.</p><p>For example:</p><pre>curl https://nuxprint.com/api/printers \<br>  -H &quot;X-API-Key: YOUR_API_KEY&quot;</pre><p>Your API key should normally be stored securely on your backend.</p><p>Avoid exposing it directly inside frontend JavaScript.</p><p>Instead:</p><pre>Browser<br>   |<br>   v<br>Your Backend<br>   |<br>   | NuxPrint API Key<br>   v<br>NuxPrint API</pre><p>This allows your backend to control which printers users can access and what can be printed.</p><h3>Step 2: Install the NuxPrint Agent</h3><p>Next, install the NuxPrint Agent on a computer that has access to the printers you want to use.</p><p>The printers may be connected through:</p><ul><li>USB, Wi-Fi, Local network, Printer drivers installed on the operating system</li></ul><p>After installing the Agent, sign in using your NuxPrint account.</p><p>The Agent can then register printers accessible from that computer with NuxPrint, making them available through both the dashboard and API.</p><p>This is an important part of the architecture.</p><p>Your SaaS application does not need to know how to communicate with every printer model.</p><p>The Agent handles that local environment.</p><h3>Step 3: Discover Available Printers</h3><p>Once the Agent is connected, your application can retrieve registered printers.</p><p>NuxPrint exposes endpoints for printers and connected devices:</p><pre>GET /api/printers<br>GET /api/devices</pre><p>For example:</p><pre>curl https://nuxprint.com/api/printers \<br>  -H &quot;X-API-Key: YOUR_API_KEY&quot;</pre><p>A printer response contains information such as its name, connection type, current status, associated device, and an externalId.</p><p>Conceptually, the response may look like:</p><pre>{<br>  &quot;printers&quot;: [<br>    {<br>      &quot;externalId&quot;: &quot;847291&quot;,<br>      &quot;name&quot;: &quot;Xprinter XP-DT325B&quot;,<br>      &quot;status&quot;: &quot;online&quot;,<br>      &quot;connectionType&quot;: &quot;USB&quot;,<br>      &quot;isActive&quot;: true<br>    }<br>  ]<br>}</pre><p>The important field here is:</p><pre>&quot;externalId&quot;: &quot;847291&quot;</pre><p>This identifier is used as the printerId when creating a print job.</p><p>That means your application can store printer assignments.</p><p>For example:</p><pre>Branch: Istanbul Store<br><br>Invoice Printer:<br>847291<br>Kitchen Printer:<br>847292<br>Label Printer:<br>847293</pre><p>Now your application knows exactly where each type of document should go.</p><h3>Step 4: Send Your First Print Job</h3><p>Once you have a printer ID, printing becomes an API request.</p><p>NuxPrint creates print jobs through:</p><pre>POST /api/print-jobs</pre><p>A request can specify information including:</p><ul><li>printer, document name, document type, document content, number of copies</li></ul><p>A simplified request looks like this:</p><pre>curl -X POST https://nuxprint.com/api/print-jobs \<br>  -H &quot;X-API-Key: YOUR_API_KEY&quot; \<br>  -H &quot;Content-Type: application/json&quot; \<br>  -d &#39;{<br>    &quot;printerId&quot;: &quot;847291&quot;,<br>    &quot;documentName&quot;: &quot;invoice.pdf&quot;,<br>    &quot;documentType&quot;: &quot;pdf&quot;,<br>    &quot;documentData&quot;: &quot;BASE64_DOCUMENT_DATA&quot;,<br>    &quot;copies&quot;: 1<br>  }&#39;</pre><p>The printerId corresponds to the printer&#39;s externalId.</p><p>The document itself can be sent as Base64-encoded data.</p><p>This is especially useful for backend-generated documents.</p><p>Your server can:</p><pre>Generate PDF<br>     ↓<br>Convert to Base64<br>     ↓<br>Send to NuxPrint API<br>     ↓<br>Print</pre><p>There is no requirement for the generated PDF to first exist at a public URL.</p><h3>A Simple Node.js Example</h3><p>Suppose your Node.js application generates an invoice.</p><p>After generating the PDF, you could convert the document to Base64 and submit a print job.</p><p>A simplified implementation might look like this:</p><pre>import fs from &quot;fs&quot;;<br>import axios from &quot;axios&quot;;<br><br>const pdf = fs.readFileSync(&quot;./invoice.pdf&quot;);<br>const documentData = pdf.toString(&quot;base64&quot;);<br>await axios.post(<br>  &quot;https://nuxprint.com/api/print-jobs&quot;,<br>  {<br>    printerId: &quot;847291&quot;,<br>    documentName: &quot;invoice.pdf&quot;,<br>    documentType: &quot;pdf&quot;,<br>    documentData,<br>    copies: 1<br>  },<br>  {<br>    headers: {<br>      &quot;Content-Type&quot;: &quot;application/json&quot;,<br>      &quot;X-API-Key&quot;: process.env.NUXPRINT_API_KEY<br>    }<br>  }<br>);</pre><p>From the user’s perspective, the workflow could now be as simple as:</p><pre>Click &quot;Print Invoice&quot;<br>        ↓<br>Backend generates PDF<br>        ↓<br>Backend calls NuxPrint<br>        ↓<br>Printer starts printing</pre><p>No download dialog.</p><p>No manually opening the PDF.</p><p>No browser print dialog.</p><h3>Printing More Than PDFs</h3><p>Business printing isn’t limited to A4 documents.</p><p>Different industries rely on different printer languages and document formats.</p><p>NuxPrint supports print jobs including PDF, ZPL, EPL, ESC/POS, and raw printer data.</p><p>That opens up several use cases.</p><h3>PDF</h3><p>Useful for:</p><ul><li>invoices, reports, contracts, standard documents</li></ul><h3>ZPL / EPL</h3><p>Commonly used with label printers for:</p><ul><li>shipping labels, barcodes, warehouse labels, product labels</li></ul><h3>ESC/POS</h3><p>Commonly used with thermal receipt printers for:</p><ul><li>POS receipts, restaurant tickets, order slips</li></ul><h3>Raw Printing</h3><p>Useful when applications need direct control over printer-specific commands.</p><p>Because the printing layer is API-driven, the same application can potentially work with multiple printer types depending on the workflow.</p><h3>A More Realistic SaaS Architecture</h3><p>Cloud printing becomes even more interesting when building multi-tenant applications.</p><p>Imagine you operate a SaaS platform used by hundreds of businesses.</p><p>Each customer may have:</p><pre>Customer A<br> ├── Office PC<br> │    ├── Invoice Printer<br> │    └── Label Printer<br> │<br> └── Warehouse PC<br>      └── Shipping Printer</pre><pre>Customer B<br> ├── Restaurant POS<br> │    ├── Cashier Printer<br> │    └── Kitchen Printer</pre><p>Your application can store printer assignments for each customer.</p><p>For example:</p><pre>{<br>  &quot;userId&quot;: 42,<br>  &quot;printers&quot;: {<br>    &quot;invoice&quot;: &quot;847291&quot;,<br>    &quot;shipping&quot;: &quot;847292&quot;,<br>    &quot;receipt&quot;: &quot;847293&quot;<br>  }<br>}</pre><p>Then your business logic decides where the print job goes.</p><pre>if (document.type === &quot;invoice&quot;) {<br>  printerId = user.printers.invoice;<br>}</pre><pre>if (document.type === &quot;shipping_label&quot;) {<br>  printerId = user.printers.shipping;<br>}</pre><p>The result is a much cleaner separation between application logic and physical printer infrastructure.</p><p>Your application understands <strong>what needs to be printed and where</strong>.</p><p>The local Agent handles <strong>how that physical printer is reached</strong>.</p><h3>Cloud Printing Is Really About Removing the Network Barrier</h3><p>The interesting part of cloud printing isn’t simply sending a PDF to a printer.</p><p>It is removing a fundamental infrastructure problem.</p><p>Traditionally, printing assumes that the application and printer exist in roughly the same environment.</p><p>Modern applications don’t work that way.</p><p>Your backend might be running thousands of kilometers away from the user’s computer.</p><p>The printer might be connected over USB behind NAT, a firewall, and a private network.</p><p>Trying to expose that printer directly to your cloud infrastructure would create unnecessary complexity.</p><p>With an Agent-based cloud printing architecture, the model becomes much simpler:</p><pre>Cloud Application<br>       ↓<br>Cloud Print API<br>       ↓<br>Local Agent<br>       ↓<br>Printer</pre><p>The application talks to an API.</p><p>The Agent talks to the printer.</p><p>And neither side needs to pretend they exist on the same local network.</p><h3>Final Thoughts</h3><p>Printing is one of those features that seems simple until you try to integrate it into a modern cloud application.</p><p>Generating the document is usually the easy part.</p><p>Getting that document from a remote backend to the correct physical printer — automatically and reliably — is the real challenge.</p><p>NuxPrint approaches the problem by combining a cloud printing API with a local Agent.</p><p>The Agent discovers printers available in the local environment, while the API allows your application to retrieve those printers and create print jobs remotely.</p><p>For developers, this means printing can become another application workflow:</p><pre>Event → API Request → Printer</pre><p>And that difference becomes increasingly valuable when you’re building POS systems, restaurant software, warehouse applications, ERP platforms, e-commerce tools, or SaaS products where printing needs to happen automatically.</p><p>Sometimes the best infrastructure is the infrastructure your users never have to think about.</p><p>And ideally, printing should work the same way.</p><p><strong>From API to printer.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=93ed39bab771" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Working with FTP basics on CLI]]></title>
            <link>https://mehmetakkus.medium.com/working-with-ftp-basics-on-cli-80c60cba31f0?source=rss-56a60960351f------2</link>
            <guid isPermaLink="false">https://medium.com/p/80c60cba31f0</guid>
            <dc:creator><![CDATA[Mehmet Akkuş]]></dc:creator>
            <pubDate>Wed, 12 Feb 2025 22:44:45 GMT</pubDate>
            <atom:updated>2025-02-12T23:57:55.329Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZIjINakHn-N39RcBiZyM_g.png" /><figcaption>created by DALL-E</figcaption></figure><p>FTP (File Transfer Protocol) operates over TCP using port 21 for file transfers. It enables users to move large amounts of data in a single operation, making it especially useful for website management and data backup tasks.</p><h3>You can connect two ways</h3><pre># the first way - it will ask ftp username and after that password<br>ftp IP<br><br># the second way - just type ftp<br>ftp<br>&gt; open IP &lt;PORT&gt;<br><br># demo<br>ftp                                                                                                                                        ✔  1m 34s  01:09:25<br>ftp&gt; open 92.35.234.12<br>Connected to 92.35.234.12.<br>220 (vsFTPd 3.0.2)<br>Name (92.35.234.12:mehmetakkus): cdntebilisim<br>331 Please specify the password.<br>Password:<br>230 Login successful.<br><br># list with ls or dir<br>ls<br>dir<br><br># image upload - current location<br>put image.jpg<br><br># Image Upload - diffrent path<br>put image.jpg ./path<br><br># Also you can list your local files<br>!ls</pre><h3>Bonus</h3><pre># Upload any file with Curl<br>curl -T db.sql ftp://IP/path/ --user username:password</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=80c60cba31f0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Powerful Linux Command: xargs]]></title>
            <link>https://mehmetakkus.medium.com/linux-xargs-316728754e94?source=rss-56a60960351f------2</link>
            <guid isPermaLink="false">https://medium.com/p/316728754e94</guid>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Mehmet Akkuş]]></dc:creator>
            <pubDate>Fri, 27 Dec 2024 15:46:56 GMT</pubDate>
            <atom:updated>2024-12-27T16:04:38.082Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uqGHFFKzmbBChbCKul_B7w.jpeg" /></figure><p><strong>Here are some usage examples of one of the most powerful commands in Linux:</strong> xargs</p><pre># Pattern<br>command | xargs [options] [command]</pre><p><strong>If you want to run a command for multiple files or operation xargs could be best for that.</strong></p><pre># remove a couple files at once<br>echo &quot;file1.txt file2.txt&quot; | xargs rm<br><br># that means<br>rm file1.txt<br>rm file2.txt<br><br># one more for the paths<br>echo &quot;x y z&quot; | xargs rm -rf<br><br># and that means<br>rm -rf x<br>rm -rf y<br>rm -rf z</pre><p><strong>Pretty good right. So that means a lot of thing that we can do:</strong></p><pre># you can find .tmp extension files with find command and then <br>find . -name &quot;*.tmp&quot; | xargs rm<br><br># xargs -I {} replaces {} with the file name for each file name<br>ls *.json | xargs -I {} cat {}<br><br># move to logs dir all .logs extension files<br>ls *.log | xargs -I {} mv {} logs/</pre><h4>Caution! Powerful features is coming</h4><p>You can list any key with <em>redis-cli — scan — pattern. </em>As it is known, Redis doesn’t support multiple key delete.</p><p><strong>We can do with xargs:</strong></p><pre># delete all redis keys starting with prefix: <br>redis-cli --scan --pattern &quot;prefix:*&quot; | xargs redis-cli del</pre><p><strong>Send curl request to url list:</strong></p><pre># Send curl request to all url list in order<br>cat urls.txt | xargs -n 1 curl<br><br># Also xargs support async with -P you can 4 process at once<br>cat urls.txt | xargs -P 4 -n 1 curl</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=316728754e94" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Linux SSH root connection permission]]></title>
            <link>https://mehmetakkus.medium.com/linux-ssh-root-connection-permission-73821d53259e?source=rss-56a60960351f------2</link>
            <guid isPermaLink="false">https://medium.com/p/73821d53259e</guid>
            <dc:creator><![CDATA[Mehmet Akkuş]]></dc:creator>
            <pubDate>Wed, 13 Dec 2023 09:19:54 GMT</pubDate>
            <atom:updated>2024-02-14T21:09:31.699Z</atom:updated>
            <content:encoded><![CDATA[<p>first time when we set up any linux dist. bkz: Ubuntu. When you try to access the root user via ssh you may have encountered this:</p><pre>Permission denied, please try again.</pre><p>you have to login other user first and after:</p><pre>// open<br>vim /etc/ssh/sshd_config<br><br>// edit the PermitRootLogin line (it might be comment line)<br>PermitRootLogin yes<br><br>// restart sshd service<br>systemctl restart sshd<br></pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=73821d53259e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Optimize Images in File System via Terminal]]></title>
            <link>https://mehmetakkus.medium.com/optimize-images-in-file-system-via-terminal-4cb2ce2bee67?source=rss-56a60960351f------2</link>
            <guid isPermaLink="false">https://medium.com/p/4cb2ce2bee67</guid>
            <dc:creator><![CDATA[Mehmet Akkuş]]></dc:creator>
            <pubDate>Wed, 06 Dec 2023 15:25:24 GMT</pubDate>
            <atom:updated>2023-12-06T15:25:24.933Z</atom:updated>
            <content:encoded><![CDATA[<pre>// ubuntu/debian based linux<br>sudo apt-get install jpegoptim<br><br>// mac<br>brew install jpegoptim<br><br>// just optimize single img by default<br>jpegoptim img_file<br><br>// optimize bulk (in the current directory)<br>jpegoptim *.jpg</pre><h4>by quality or size limitation</h4><pre>// optimize with 90% quality<br>jpegoptim -m 90 *.jpg<br><br>// let it be max. 100kb<br>jpegoptim --size=100k *.jpg</pre><h4>what about png images</h4><pre>// ubuntu/debian based linux<br>sudo apt-get install optipng<br><br>// mac<br>brew install optipng<br><br>// just optimize single img by default<br>optipng img_file<br><br>// optimize bulk (in the current directory)<br>optipng *.jpg</pre><h4>with settings</h4><pre>// optipng receives optimization level val with -o parameters between 1-7<br><br>// more aggressive<br>optipng -o7 *.png<br><br>// less<br>optipng -o1 *.png</pre><h4>bonus</h4><p><em>don’t forget the backup</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4cb2ce2bee67" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kısaca .filter() .some().sort().reduce() .find() .map()]]></title>
            <link>https://mehmetakkus.medium.com/k%C4%B1saca-filter-some-sort-reduce-find-map-e688801f8695?source=rss-56a60960351f------2</link>
            <guid isPermaLink="false">https://medium.com/p/e688801f8695</guid>
            <dc:creator><![CDATA[Mehmet Akkuş]]></dc:creator>
            <pubDate>Wed, 06 Dec 2023 12:27:26 GMT</pubDate>
            <atom:updated>2024-12-22T11:46:31.423Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/785/1*-a4Sw9oLuH1aBeRQbH5awQ.jpeg" /><figcaption><a href="https://miro.medium.com/v2/resize:fit:4800/format:webp/1*6sqWjWdlUZEAClscqMbfGQ.jpeg">https://miro.medium.com/v2/resize:fit:4800/format:webp/1*6sqWjWdlUZEAClscqMbfGQ.jpeg</a></figcaption></figure><h3>Kısaca .filter() .some().sort().reduce() .find() .map()</h3><p>.filter() Fonksiyonu:</p><ul><li>Amaç: Bir dizideki öğeleri belirli bir koşula göre filtrelemek.</li><li>Array[] return eder</li><li>filter metodu, eşleşen tüm öğeleri bir dizi (array) olarak döndürür. Eğer tek bir <strong>obje</strong> (veya bulduğu ilk <strong>obje</strong>) isteniyorsa, filter yerine find metodu kullanılır</li></ul><pre>let filteredItems = array.filter(item =&gt; item.property &gt; someValue);</pre><p>.some() Fonksiyonu:</p><ul><li>Amaç: Bir dizideki öğelerden herhangi birinin belirli bir koşulu karşılayıp karşılamadığını kontrol etmek.</li><li>Boolen - true veya false return eder</li></ul><pre>let exists = array.some(item =&gt; item.property === someValue);</pre><p>.sort() Fonksiyonu:</p><ul><li>Amaç: Bir diziyi belirli bir sıralama kriterine göre sıralamak.</li></ul><pre>let sortedArray = array.sort((a, b) =&gt; a - b);</pre><p>.reduce() Fonksiyonu:</p><ul><li>Amaç: Bir dizinin tüm öğelerini tek bir değere indirgemek.</li><li>Nasıl Çalışır: .reduce() fonksiyonu, bir toplayıcı değer ve o anki değerin tutulduğu iki parametre ike çalışır. Bu işlem sonucunda tek bir değer elde edilir. Başlangıç değeri ve üzerine değerleri toplayan değişkene genelde accumulator denir ve son parametre de başlangıç değeri verilir verilmezse ilk değer başlangıç değeri olur.</li></ul><pre>// Dizideki tüm sayıları topla<br>let sum = array.reduce((accumulator, currentValue) =&gt; accumulator + currentValue, 0); </pre><p>.map() Fonksiyonu:</p><ul><li>Amaç: Bir dizinin tüm öğelerini dönüştürmek ve bu dönüştürülmüş öğelerden yeni bir dizi oluşturmak.</li></ul><pre>// Dizideki her öğeyi iki ile çarparak yeni bir dizi oluştur<br>let mappedArray = array.map(item =&gt; item * 2);</pre><p>.find() Fonksiyonu:</p><ul><li>Amaç: Bir dizide belirli bir koşulu karşılayan ilk öğeyi bulmak.</li><li>Nasıl Çalışır: .find() fonksiyonu, dizinin her bir öğesini belirtilen koşulla test eder ve koşulu karşılayan ilk öğeyi döndürür. Eğer hiçbir öğe koşulu karşılamazsa, undefined döndürülür.</li><li>Dizideki değer obje ise objeyi döndürür. Dizideki eşleşen ilgili objenin dönmesi gereken durumlar için uygun.</li></ul><pre>let foundItem = array.find(item =&gt; item.property === someValue);</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e688801f8695" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[React HOC dışında state erişimi]]></title>
            <link>https://mehmetakkus.medium.com/react-hoc-d%C4%B1%C5%9F%C4%B1nda-state-eri%C5%9Fimi-2282d9d73dab?source=rss-56a60960351f------2</link>
            <guid isPermaLink="false">https://medium.com/p/2282d9d73dab</guid>
            <dc:creator><![CDATA[Mehmet Akkuş]]></dc:creator>
            <pubDate>Mon, 04 Dec 2023 09:02:17 GMT</pubDate>
            <atom:updated>2023-12-04T09:02:17.610Z</atom:updated>
            <content:encoded><![CDATA[<p>Normal şartlar altında useSelector vey ts kullanırken genelde useAppSelector şeklinde export ettiğimiz hook ile erişimler sadece hoc kullanımında izin veriliyor eğer başka bir yerde yazdığımız fonksiyonda state’e erişim gerekirse bu şekilde kullanılabilir.</p><pre>import store from &#39;@/store&#39;<br><br>store.getState().REDUCERNAME.state<br><br>bkz:<br><br>store.getState().auth.isAuth</pre><p>Yine de genel manada fonksiyon bu datayı parametre olarak alıp buna fazla ihtiyaç bırakmamak esneklik açısından faydalı olacaktır.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2282d9d73dab" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Change a string from file]]></title>
            <link>https://mehmetakkus.medium.com/change-a-string-from-file-dac25ee802dc?source=rss-56a60960351f------2</link>
            <guid isPermaLink="false">https://medium.com/p/dac25ee802dc</guid>
            <dc:creator><![CDATA[Mehmet Akkuş]]></dc:creator>
            <pubDate>Sat, 02 Dec 2023 12:53:31 GMT</pubDate>
            <atom:updated>2023-12-02T12:53:31.141Z</atom:updated>
            <content:encoded><![CDATA[<pre>// it&#39;s changing all match<br>sed -i &#39;s/current_string/new_string/g&#39; file_path</pre><p>Bonus:</p><p>sed: stream editor</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dac25ee802dc" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>