<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ahmad Ya'kob Ubaidullah</title>
    <description>The latest articles on DEV Community by Ahmad Ya'kob Ubaidullah (@abigoroth).</description>
    <link>https://dev.to/abigoroth</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F209394%2F44484ea8-0535-47a0-9391-8ce934c3c924.jpeg</url>
      <title>DEV Community: Ahmad Ya'kob Ubaidullah</title>
      <link>https://dev.to/abigoroth</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/abigoroth"/>
    <language>en</language>
    <item>
      <title>typescript eslint with RubyMine</title>
      <dc:creator>Ahmad Ya'kob Ubaidullah</dc:creator>
      <pubDate>Thu, 24 Nov 2022 07:29:19 +0000</pubDate>
      <link>https://dev.to/abigoroth/typescript-eslint-with-rubymine-3lmo</link>
      <guid>https://dev.to/abigoroth/typescript-eslint-with-rubymine-3lmo</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--v3t_RETs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w1p7fbxoha0qk0v36svb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--v3t_RETs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w1p7fbxoha0qk0v36svb.png" alt="Image description" width="880" height="665"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Files to Watch:&lt;br&gt;
File type: TypeScript&lt;/p&gt;

&lt;p&gt;Tool to Run on Changes&lt;br&gt;
Program: $ProjectFileDir$\node_modules.bin\eslint&lt;br&gt;
Arguments: --fix -c $ProjectFileDir$/config/.eslintrc.json $/FilePathRelativeToProjectRoot$&lt;br&gt;
Output paths to refresh: $FilePathRelativeToProjectRoot$&lt;br&gt;
Working Directory: $ProjectFileDir$&lt;/p&gt;

</description>
    </item>
    <item>
      <title>tomo deploy. Deploy rails app in one command. Heroku alike.</title>
      <dc:creator>Ahmad Ya'kob Ubaidullah</dc:creator>
      <pubDate>Thu, 24 Mar 2022 03:07:56 +0000</pubDate>
      <link>https://dev.to/abigoroth/tomo-deploy-deploy-rails-app-in-one-command-heroku-alike-1fdf</link>
      <guid>https://dev.to/abigoroth/tomo-deploy-deploy-rails-app-in-one-command-heroku-alike-1fdf</guid>
      <description>&lt;p&gt;&lt;a href="https://tomo-deploy.com/"&gt;tomo deploy&lt;/a&gt; allow user to deploy with just one command. Tomo will do both setup and deploy processes. Tomo deploy will allow Heroku alike features to be install onto your own server&lt;/p&gt;

&lt;p&gt;for the &lt;code&gt;tomo setup&lt;/code&gt; command it will:&lt;br&gt;
  run "env:setup"&lt;br&gt;
  run "core:setup_directories"&lt;br&gt;
  run "git:clone"&lt;br&gt;
  run "git:create_release"&lt;br&gt;
  run "core:symlink_shared"&lt;br&gt;
  run "bundler:upgrade_bundler"&lt;br&gt;
  run "bundler:config"&lt;br&gt;
  run "bundler:install"&lt;br&gt;
  # run "rails:db_create"&lt;br&gt;
  run "rails:db_schema_load"&lt;br&gt;
  run "rails:db_seed"&lt;br&gt;
  run "puma:setup_systemd"&lt;br&gt;
  run 'sidekiq:setup_systemd'&lt;/p&gt;

&lt;p&gt;for the &lt;code&gt;tomo deploy&lt;/code&gt; command it will:&lt;br&gt;
  run "env:update"&lt;br&gt;
  run "git:create_release"&lt;br&gt;
  run "core:symlink_shared"&lt;br&gt;
  run "core:write_release_json"&lt;br&gt;
  run "bundler:install"&lt;br&gt;
  run 'yarn:check_files'&lt;br&gt;
  run "rails:db_migrate"&lt;br&gt;
  run "rails:assets_precompile"&lt;br&gt;
  run "core:symlink_current"&lt;br&gt;
  run "puma:restart"&lt;br&gt;
  run "puma:check_active"&lt;br&gt;
  run "core:clean_releases"&lt;br&gt;
  run "bundler:clean"&lt;br&gt;
  run "core:log_revision"&lt;br&gt;
  run 'sidekiq:restart'&lt;/p&gt;

&lt;p&gt;of course we can secify our own task in these processes by adding plugin to it. eg:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;plugin './plugins/yarn.rb'&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;./plugins/yarn.rb&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def check_files
  remote.chdir(paths.release) do
    remote.run('yarn', 'install', '--check-files')
  end
end
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;then we can add &lt;code&gt;run 'yarn:check_files'&lt;/code&gt; to our process.&lt;/p&gt;

&lt;p&gt;This is the part that I love about tomo deploy.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;git:create_release&lt;/strong&gt; source: tomo-deploy.com&lt;br&gt;
Fetches the latest commits from git_branch (or git_ref) and creates a release by copying the contents of that branch of repository into a new release inside the releases_path. Releases are numbered based on the timestamp of when the deploy takes place.&lt;/p&gt;

&lt;p&gt;git:create_release is intended for use as a deploy task.&lt;/p&gt;

&lt;h2&gt;
  
  
  TOP 3 TOMO COMMANDS
&lt;/h2&gt;

&lt;p&gt;There are tons of goodness when it comes to tomo commands. We browse all commands through &lt;code&gt;tomo tasks&lt;/code&gt; command.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;To see running log on remote deploy server, we can use this command: &lt;code&gt;tomo puma:tail_log&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QpBXGBZ8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nc95zlb9i61l93wiltgf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QpBXGBZ8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nc95zlb9i61l93wiltgf.png" alt="Image description" width="880" height="285"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;To access remote server data-via-activerecord we can always use our handy &lt;code&gt;rails console&lt;/code&gt; but to do it remotely with tomo, we can use &lt;code&gt;tomo rails:console&lt;/code&gt;. &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pYVNGPyD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2tu30lwj1lz0zatpc97l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pYVNGPyD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2tu30lwj1lz0zatpc97l.png" alt="Image description" width="557" height="145"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;tomo sidekiq:log&lt;/code&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5UMjoeeA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8kg0uu4x50m5uy1woh8c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5UMjoeeA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8kg0uu4x50m5uy1woh8c.png" alt="Image description" width="880" height="366"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;WARNING:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Do not use &lt;code&gt;set env_vars&lt;/code&gt; to update your &lt;code&gt;PATH&lt;/code&gt;. We cannot use like &lt;code&gt;export "PATH=$PATH:/our/bin"&lt;/code&gt; in env_vars, as it will break our path. I have break it once and I suggest other people to do it on to the remote(deploy server) shell it self.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;To allow message encryptor to work properly, we need to make sure:&lt;br&gt;
a. master.key content from our local machine are the same RAILS_MASTER_KEY that we enter onto the remote server via &lt;code&gt;tomo setup&lt;/code&gt;. &lt;br&gt;
b. we add and commit+push our local &lt;code&gt;credentials.yml.enc&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;thank you for reading. &lt;/p&gt;

</description>
      <category>ruby</category>
      <category>devops</category>
      <category>heroku</category>
    </item>
    <item>
      <title>Postgres pre modify data before inserts</title>
      <dc:creator>Ahmad Ya'kob Ubaidullah</dc:creator>
      <pubDate>Mon, 22 Feb 2021 11:08:29 +0000</pubDate>
      <link>https://dev.to/abigoroth/postgres-pre-modify-data-before-inserts-18dl</link>
      <guid>https://dev.to/abigoroth/postgres-pre-modify-data-before-inserts-18dl</guid>
      <description>&lt;p&gt;Let say we want to modify data with only matching text &lt;code&gt;*redirect*&lt;/code&gt; in the &lt;code&gt;rpz_zone&lt;/code&gt; column, we first create the function like below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CREATE OR REPLACE FUNCTION public.update_redirect_rpz()
 RETURNS trigger
 LANGUAGE plpgsql
AS $function$
BEGIN
IF NEW.rpz_zone like '%redirect%' THEN
    NEW.redirect = true;
END IF;
RETURN NEW;
END;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;then we can check the function with &lt;code&gt;\ef update_redirect_rpz&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;after this we create a trigger to hook this method to an event like below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   CREATE TRIGGER bind_rpz_log_redirect_flag
   BEFORE INSERT ON bind_rpz_log
   FOR EACH ROW EXECUTE PROCEDURE update_redirect_rpz();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Incase something went wrong, you can always check your log like in my case it is like this &lt;code&gt;tail -f -n100 /var/log/messages&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Feb 22 19:02:13 dnsvgitnlognode postgres[39307]: [28-1] 2021-02-22 19:02:13.682 +08 [39307] ERROR:  syntax error at or near "update_redirect_rpz" at character 1
Feb 22 19:02:13 dnsvgitnlognode postgres[39307]: [28-2] 2021-02-22 19:02:13.682 +08 [39307] STATEMENT:  update_redirect_rpz
Feb 22 19:02:13 dnsvgitnlognode postgres[39307]: [28-3]     ();
Feb 22 19:02:18 dnsvgitnlognode postgres[39307]: [29-1] 2021-02-22 19:02:18.202 +08 [39307] ERROR:  syntax error at or near "function" at character 1
Feb 22 19:02:18 dnsvgitnlognode postgres[39307]: [29-2] 2021-02-22 19:02:18.202 +08 [39307] STATEMENT:  function update_redirect_rpz();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>postgres</category>
    </item>
    <item>
      <title>how to make rackup sinatra as systemd and auto restart on failure</title>
      <dc:creator>Ahmad Ya'kob Ubaidullah</dc:creator>
      <pubDate>Fri, 19 Feb 2021 20:04:10 +0000</pubDate>
      <link>https://dev.to/abigoroth/how-to-make-rackup-sinatra-as-systemd-and-auto-restart-on-failure-3329</link>
      <guid>https://dev.to/abigoroth/how-to-make-rackup-sinatra-as-systemd-and-auto-restart-on-failure-3329</guid>
      <description>&lt;p&gt;sinatra app&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#acc-server.rb
require 'sinatra/base'

class MyApp &amp;lt; Sinatra::Base
  set :bind, '0.0.0.0'
  set :port, 3333

  get '/' do
    "Hello #{params[:name]}"
  end
  run! if app_file == $0
end
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;rackup&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;require './acc-server'
run MyApp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;shell script &lt;code&gt;server.sh&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#!/bin/bash
cd /root/server &amp;amp;&amp;amp; /usr/local/bin/rackup -p 3333 -P /root/server/server.pid &amp;lt;/dev/null &amp;amp;&amp;gt;&amp;gt;/root/server/log
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;systemd conf &lt;code&gt;/etc/systemd/system/pserver.service&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[Unit]
Description=Prosody http server

[Service]
ExecStart=/root/server/server.sh
Restart=on-failure

[Install]
WantedBy=multi-user.target
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;start the service&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;systemctl start pserver.service 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;then enable it on startup&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;systemctl enable pserver.service 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>sinatra</category>
      <category>systemd</category>
    </item>
    <item>
      <title>How to deploy production environment rails 6</title>
      <dc:creator>Ahmad Ya'kob Ubaidullah</dc:creator>
      <pubDate>Thu, 18 Feb 2021 05:06:01 +0000</pubDate>
      <link>https://dev.to/abigoroth/how-to-reploy-production-environment-rails-6-316c</link>
      <guid>https://dev.to/abigoroth/how-to-reploy-production-environment-rails-6-316c</guid>
      <description>&lt;p&gt;at other server run :&lt;br&gt;
&lt;code&gt;EDITOR=vim rails credentials:edit&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;add and commit &lt;br&gt;
config/secrets.yml.enc&lt;/p&gt;

&lt;p&gt;then push and pull to production server.&lt;/p&gt;

&lt;p&gt;copy master key and put into production server ENV using &lt;code&gt;config/application.yml&lt;/code&gt; which will be loaded using figaro gem. The format is like this :&lt;/p&gt;

&lt;p&gt;&lt;code&gt;RAILS_MASTER_KEY: masterkeyhere&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;then start your server in production environment.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Note that not to commit application.yml , and better to add it to gitignore.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>rails</category>
    </item>
    <item>
      <title>sudo service cron start</title>
      <dc:creator>Ahmad Ya'kob Ubaidullah</dc:creator>
      <pubDate>Mon, 25 Jan 2021 23:48:24 +0000</pubDate>
      <link>https://dev.to/abigoroth/sudo-service-cron-start-1kpi</link>
      <guid>https://dev.to/abigoroth/sudo-service-cron-start-1kpi</guid>
      <description>&lt;p&gt;crontab is also a service, its need to be started. &lt;br&gt;
Especially when you are running in WSL.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo service cron start&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://stackoverflow.com/a/58608597/610987"&gt;https://stackoverflow.com/a/58608597/610987&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>JITSI restart all and debugging all log</title>
      <dc:creator>Ahmad Ya'kob Ubaidullah</dc:creator>
      <pubDate>Fri, 22 Jan 2021 02:48:09 +0000</pubDate>
      <link>https://dev.to/abigoroth/jitsi-restart-all-and-debugging-all-log-537j</link>
      <guid>https://dev.to/abigoroth/jitsi-restart-all-and-debugging-all-log-537j</guid>
      <description>&lt;p&gt;&lt;a href="https://jochen.kirstaetter.name/authentication-jitsi-meet/"&gt;https://jochen.kirstaetter.name/authentication-jitsi-meet/&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>RUN SQL FILE in postgres</title>
      <dc:creator>Ahmad Ya'kob Ubaidullah</dc:creator>
      <pubDate>Mon, 18 Jan 2021 03:38:09 +0000</pubDate>
      <link>https://dev.to/abigoroth/run-sql-file-in-postgres-18fj</link>
      <guid>https://dev.to/abigoroth/run-sql-file-in-postgres-18fj</guid>
      <description>&lt;p&gt;&lt;a href="https://kb.objectrocket.com/postgresql/how-to-run-an-sql-file-in-postgres-846"&gt;https://kb.objectrocket.com/postgresql/how-to-run-an-sql-file-in-postgres-846&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Tracking long queries into csv</title>
      <dc:creator>Ahmad Ya'kob Ubaidullah</dc:creator>
      <pubDate>Mon, 28 Dec 2020 07:13:05 +0000</pubDate>
      <link>https://dev.to/abigoroth/tracking-long-queries-into-csv-2l0</link>
      <guid>https://dev.to/abigoroth/tracking-long-queries-into-csv-2l0</guid>
      <description>&lt;p&gt;If you have tons of queries executed in a Job or in a method, and you want to monitor which queries are slow and need attention, how do you track them ?&lt;/p&gt;

&lt;p&gt;I was wondering what really dragging my cache job running time. The job supposed to be done in under 4 minutes suddenly spiked to 22 minutes. &lt;/p&gt;

&lt;p&gt;I found &lt;a href="https://github.com/kirillshevch/query_track"&gt;&lt;code&gt;query_tracker&lt;/code&gt; gem&lt;/a&gt; which displays all the info I needed. It also allows slack integration. In my case, I wanted it to store query informations into CSV. Fortunately the gem allows &lt;a href="https://github.com/kirillshevch/query_track#custom-notifications-handlers"&gt;custom handlers&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;Below is how I did my custom handlers :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;QueryTrack::Settings.configure do |config|
  config.duration = 0.5
  config.notifications.custom_handler = -&amp;gt; (sql, duration, trace) {
    CSV.open("log/query_tracker.csv", "a+") do |csv|
      csv &amp;lt;&amp;lt; [Time.now, duration, sql, trace]
    end
  }
end
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;notice the &lt;code&gt;a+&lt;/code&gt; open type, that will prepend the file.&lt;/p&gt;

&lt;p&gt;Now all the queries information are visible for your next action :&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Eh0ODjHt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/zr2np32zjlxkeoldqexw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Eh0ODjHt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/zr2np32zjlxkeoldqexw.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can always use the sort function to get more insights :&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zn7VFo2F--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/hgdp6rmtxuwid3loxhhj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zn7VFo2F--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/hgdp6rmtxuwid3loxhhj.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In my case, this is my queries that needs attention :&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--FmWK7pcK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/a0fcooqtj4fdzqnaghfe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FmWK7pcK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/a0fcooqtj4fdzqnaghfe.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thank you :)&lt;/p&gt;

</description>
      <category>activerecord</category>
      <category>rails</category>
      <category>database</category>
    </item>
    <item>
      <title>net::ERR_INCOMPLETE_CHUNKED_ENCODING nginx</title>
      <dc:creator>Ahmad Ya'kob Ubaidullah</dc:creator>
      <pubDate>Mon, 21 Dec 2020 10:33:16 +0000</pubDate>
      <link>https://dev.to/abigoroth/net-errincompletechunkedencoding-nginx-4onn</link>
      <guid>https://dev.to/abigoroth/net-errincompletechunkedencoding-nginx-4onn</guid>
      <description>&lt;p&gt;Weird error that never show up in your life. This is it. The thing that scrutinize me for hourss.&lt;/p&gt;


&lt;div class="ltag__stackexchange--container"&gt;
  &lt;div class="ltag__stackexchange--title-container"&gt;
    
      &lt;div class="ltag__stackexchange--title"&gt;
        &lt;h1&gt;
          &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pTF_nE4a--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/stackoverflow-logo-b42691ae545e4810b105ee957979a853a696085e67e43ee14c5699cf3e890fb4.svg" alt=""&gt;
            &lt;a href="https://stackoverflow.com/questions/29789268/neterr-incomplete-chunked-encoding-nginx/49110604#49110604" rel="noopener noreferrer"&gt;
              &lt;span class="title-flare"&gt;answer&lt;/span&gt; re:  net::ERR_INCOMPLETE_CHUNKED_ENCODING nginx
            &lt;/a&gt;
        &lt;/h1&gt;
        &lt;div class="ltag__stackexchange--post-metadata"&gt;
          &lt;span&gt;Mar  5 '18&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;a class="ltag__stackexchange--score-container" href="https://stackoverflow.com/questions/29789268/neterr-incomplete-chunked-encoding-nginx/49110604#49110604" rel="noopener noreferrer"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5MiFESHx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/stackexchange-arrow-up-eff2e2849e67d156181d258e38802c0b57fa011f74164a7f97675ca3b6ab756b.svg" alt=""&gt;
        &lt;div class="ltag__stackexchange--score-number"&gt;
          16
        &lt;/div&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Rk_a5QFN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/stackexchange-arrow-down-4349fac0dd932d284fab7e4dd9846f19a3710558efde0d2dfd05897f3eeb9aba.svg" alt=""&gt;
      &lt;/a&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--body"&gt;
    
&lt;p&gt;Bumped into this issue on AWS and found that adding a few proxy_buffer directives to the site config file fixed the issues:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;server {
    ...

    location / {
        ...
        proxy_buffers 8 1024k;  
        proxy_buffer_size 1024k;
    }
}
&lt;/code&gt;&lt;/pre&gt;

    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--btn--container"&gt;
    
      &lt;a href="https://stackoverflow.com/questions/29789268/neterr-incomplete-chunked-encoding-nginx/49110604#49110604" rel="noopener noreferrer"&gt;Open Full Answer&lt;/a&gt;
    
  &lt;/div&gt;
&lt;/div&gt;


</description>
      <category>nginx</category>
      <category>rails</category>
      <category>ruby</category>
    </item>
    <item>
      <title>Answer: postgresql - get count by value ranges</title>
      <dc:creator>Ahmad Ya'kob Ubaidullah</dc:creator>
      <pubDate>Mon, 21 Dec 2020 03:04:24 +0000</pubDate>
      <link>https://dev.to/abigoroth/answer-postgresql-get-count-by-value-ranges-3f91</link>
      <guid>https://dev.to/abigoroth/answer-postgresql-get-count-by-value-ranges-3f91</guid>
      <description>&lt;p&gt;how to count specific range of number&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag__stackexchange--container"&gt;
  &lt;div class="ltag__stackexchange--title-container"&gt;
    
      &lt;div class="ltag__stackexchange--title"&gt;
        &lt;h1&gt;
          &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pTF_nE4a--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/stackoverflow-logo-b42691ae545e4810b105ee957979a853a696085e67e43ee14c5699cf3e890fb4.svg" alt=""&gt;
            &lt;a href="https://stackoverflow.com/questions/26276454/postgresql-get-count-by-value-ranges/26276492#26276492" rel="noopener noreferrer"&gt;
              &lt;span class="title-flare"&gt;answer&lt;/span&gt; re:  postgresql - get count by value ranges
            &lt;/a&gt;
        &lt;/h1&gt;
        &lt;div class="ltag__stackexchange--post-metadata"&gt;
          &lt;span&gt;Oct  9 '14&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;a class="ltag__stackexchange--score-container" href="https://stackoverflow.com/questions/26276454/postgresql-get-count-by-value-ranges/26276492#26276492" rel="noopener noreferrer"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5MiFESHx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/stackexchange-arrow-up-eff2e2849e67d156181d258e38802c0b57fa011f74164a7f97675ca3b6ab756b.svg" alt=""&gt;
        &lt;div class="ltag__stackexchange--score-number"&gt;
          7
        &lt;/div&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Rk_a5QFN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/stackexchange-arrow-down-4349fac0dd932d284fab7e4dd9846f19a3710558efde0d2dfd05897f3eeb9aba.svg" alt=""&gt;
      &lt;/a&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--body"&gt;
    
&lt;pre&gt;&lt;code&gt;select name
       count(case when value &amp;lt;= 5 then 1 end) as "0-5",
       count(case when value &amp;gt; 5 and value &amp;lt;= 10 then 1 end) as "5-10",
       count(case when value &amp;gt; 10 and value &amp;lt;= 15 then 1 end) as "10-15"
from the_table
group by name;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;With the upcoming version 9.4…&lt;/p&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--btn--container"&gt;
    
      &lt;a href="https://stackoverflow.com/questions/26276454/postgresql-get-count-by-value-ranges/26276492#26276492" rel="noopener noreferrer"&gt;Open Full Answer&lt;/a&gt;
    
  &lt;/div&gt;
&lt;/div&gt;


</description>
      <category>postgres</category>
      <category>database</category>
    </item>
    <item>
      <title>How to get qname from bind log by specific ip</title>
      <dc:creator>Ahmad Ya'kob Ubaidullah</dc:creator>
      <pubDate>Wed, 16 Dec 2020 06:38:13 +0000</pubDate>
      <link>https://dev.to/abigoroth/how-to-get-qname-from-bind-log-by-specific-ip-17h6</link>
      <guid>https://dev.to/abigoroth/how-to-get-qname-from-bind-log-by-specific-ip-17h6</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cat query-2020-12-* | grep "10.22.70.195" | awk '{print $11}' | sort | uniq -c | sort -r &amp;gt; analytic
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;then the result is :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;head -n100 analytic
2504 flora.web.telegram.org
1736 ib.sin1.geoadnxs.com
1467 astro2.rastream.com
1188 dns.msftncsi.com
1079 d3k3v8arhuq5l2.cloudfront.net
1021 settingsfd-geo.trafficmanager.net
1013 cu.sni.jns.swiftserve.com
1004 global.vortex.data.trafficmanager.net
 979 v10-win.vortex.data.trafficmanager.net
 974 global.asimov.events.data.trafficmanager.net
 919 rtm.ced.jns.swiftserve.com
 894 prod.pinterest.global.map.fastly.net
 763 star-mini.c10r.facebook.com
 707 sippoolks00f02.koreasouth.cloudapp.azure.com
 705 e15275.g.akamaiedge.net
 625 web.telegram.org
 546 mmx-ds.cdn.whatsapp.net
 539 webpoolks00f02.koreasouth.cloudapp.azure.com
 534 webdir0f.online.lync.com
 528 sipfed0f.online.lync.com
 502 sjc-bid-bgp.contextweb.com
 490 webdir.online.lync.com
 456 sippoolKS00F02.infra.lync.com
 451 www.tm.a.prd.aadg.akadns.net
 445 excel.officeapps.live.com
 439 www.agoda.com
 427 play.google.com
 409 webpoolks00f02.infra.lync.com
 402 7.client-channel.google.com
 395 col-rrs-prod-pub.trafficmanager.net
 389 waws-prod-bay-023.cloudapp.net
 387 sy.eu.angsrvr.com
 367 26.client-channel.google.com
 366 www3.l.google.com
 361 e10663.dscg.akamaiedge.net
 351 www.cjwowshop.com.my
 345 www.addthis.com
 331 ssl.gstatic.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>dns</category>
      <category>logfile</category>
      <category>query</category>
      <category>grep</category>
    </item>
  </channel>
</rss>
