Skip to content

Instantly share code, notes, and snippets.

View electron0zero's full-sized avatar
🎯
Focusing

Suraj Nath electron0zero

🎯
Focusing
View GitHub Profile
@electron0zero
electron0zero / bench_object_store.md
Last active December 5, 2023 07:55
Benchmarking Object Store with Minio Wrap

This test is done aginst a local instace of Minio, running on my laptop (Intel® Core™ i7-10510U CPU @ 1.80GHz × 8, Linux x1-carbon 6.2.0-37-generic x86_64 GNU/Linux)

wrap can be found at https://github.com/minio/warp

Benchmarking Object Store

Mixed benchmark

$ warp mixed --host=127.0.0.1:9000 --access-key=$MINIO_KEY --secret-key=$MINIO_SEC --autoterm --bucket=test
@electron0zero
electron0zero / dell-D6000-dock-ubuntu.md
Last active September 19, 2023 17:24 — forked from noahp/dell-D6000-dock-ubuntu.md
Dell Universal Dock D6000 on ubuntu - Updated Sep 19, 2023
@electron0zero
electron0zero / README.md
Created April 22, 2021 12:15
GitHub rename master to main for local repos.

The default branch has been renamed!

master is now named main

If you have a local clone, you can update it by running:

git branch -m master main
git fetch origin
git branch -u origin/main main
git remote set-head origin -a
@electron0zero
electron0zero / rails-new.sh
Created March 6, 2021 16:32
Rails new without all the extra stuff
rails new . my-app --database=postgresql --skip-webpack-install --skip-test --skip-turbolinks --skip-javascript --skip-spring --skip-sprockets --skip-action-cable --skip-active-storage --skip-active-job --skip-action-text --skip-action-mailbox --skip-action-mailer
@electron0zero
electron0zero / sidekiq_monitoring
Created July 7, 2020 12:27 — forked from ngsmrk/sidekiq_monitoring
Sidekiq queue checking via rails console
stats = Sidekiq::Stats.new
stats.queues
stats.enqueued
stats.processed
stats.failed
# Copyright (c) 2014 Lukas Fittl <lukas@pganalyze.com>
#
# Released in the public domain - fork as you wish.
require 'rubygems'
require 'mixlib/cli'
require 'pg'
require 'pg_query'
require 'curses'
@electron0zero
electron0zero / README.md
Created June 30, 2020 13:37
Using Logstasher in Rails

Setting Logstasher for Rails

Logstasher's tagline is Awesome Logging for Rails !!, and it does what it says.

we have been using it in prod, and it's working fine.

Our logging setup is Logstasher -> Filebeat Sidecar -> Logstash -> Elasticsearch -> Kibana

  • Logstasher for json fomatted logs
@electron0zero
electron0zero / httparty_logger_and_debug.rb
Created June 16, 2020 11:01
Playing Around with httparty request logger and debug feature
# https://frontdeveloper.pl/2018/10/how-to-log-httparty-requests/#easy-footnote-3-298
require 'httparty'
require 'rails'
# Or wrap things up in your own class
class StackExchange
include HTTParty
# make sure logger is at info for HTTParty Logger to work
Rails.logger.level = 0
@electron0zero
electron0zero / README.md
Last active April 14, 2022 21:24
Dell Inspiron 15 7000 (7591) setup for linux - Ubuntu 18.04 LTS

README

This is guide on how to configure linux (Ubuntu 18.04 LTS) on Inspiron 15 7591 Laptop, it assumes it's already installed and running, but you want to make it better and configure

Update on Apr 15, 2022: If you now installing Ubuntu on this laptop, Use Ubuntu 21.10 or above. Ubuntu 21.10 has support for audio, and bluetooth for this laptop.

Ubuntu on Dell Inspiron 7591 - Certification Details: https://certification.ubuntu.com/hardware/201903-26880

Canonical have tested this device and it's suppoed to work with Linux (Fingerprint will not work due to lack of drivers from Goodix).

This system was tested with 18.04 LTS, running the 5.0.0-1016-oem-osp1 kernel, so we will run same for better experience

@electron0zero
electron0zero / perf.rb
Created May 28, 2020 15:31
Perf - low overhead, dead simple way to time you code, useful when you want to time things in prod
# frozen_string_literal: true
# time some code with name, and dump it in logfile
# can be used to find how much time is going in each part
#
# set perf markers in the code
# pros:
# - low overhead, gives high level picture
# cons:
# - needs marking