Posts
Public SSH Keys: Download from GitHub
Github has a feature that allows users to download their public SSH keys. This feature is useful when you need to add your SSH keys to a server or service that requires them. Here’s how you can download your public SSH keys from GitHub.
How I setup VPS
Setup swap
How to Disable Touchscreen in Ubuntu 20.04 on a Dell XPS 17
The touchscreen feature on a laptop can sometimes be more of a hindrance than a help. There are times when you might accidentally touch the screen, resulting in unwanted clicks or drags. Thankfully, there’s an easy way to disable this feature on your Dell XPS 17 running Ubuntu 20.04.
How to Permanently Hide a Volume in Windows using Diskpart and Registry
Are you looking to tidy up your workspace by hiding volumes in Windows that you don’t often use? While Windows provides a temporary solution, you may notice the hidden volume reappearing after a restart. Luckily, there’s a way to hide these volumes permanently.
Why small 'it's are bad
I recently was tasked with optimizing a very slow test suite. While looking at it, I noticed that we had a lot of small
it
blocks that had very slowbefore
blocks running before them.How to turn on ActiveRecord query tracing
When working with ActiveRecord in Ruby on Rails, it can be helpful to see all SQL queries that are executed. This can help with debugging and optimizing your application. In this post, we’ll show you how to turn on ActiveRecord query tracing.
My Onshape feature scripts
Timing belts - GT2-2mm and GT2-3mm
Guide to Setting Up Native Ruby on M1 Macs
This blog post will guide you through the process of setting up native Ruby on M1 Macs. Follow these steps:
Auto fix gem update script
I recently needed to update all gems in my project and I wrote this script to do it so that it takes Gemfile.lock from other project and tries to install all gems that are compatibile with it.
Automatic Fix script to find broken migrations
I recently needed to find which migration broke
rails db:migrate:reset
and because there were hundreds of them, I wrote this simple script to rundb:migrate:reset
and remove migrations one by one from the end and find which one is last working one:How to initialize RSpec in project
There are mostly two ways to initialize RSpec in project. One for pure Ruby projects and one for Rails projects.
Establishing an ADB Connection with Android Devices over Wi-Fi
Debugging an Android application while an accessory is connected can pose a challenge, as using ADB through a USB cable becomes impractical. In such instances, establishing an ADB connection over Wi-Fi is the ideal solution.
AWS IAM policy for only one region
Problem
You want to create IAM policy that will allow access to only one region.
Solution
You can use
Condition
to specify that only one region is allowed:{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "*", "Resource": "*", "Condition": { "StringEquals": { "aws:RequestedRegion": "eu-west-1" } } }, { "Effect": "Deny", "Action": ["iam:PassRole", "iam:CreateServiceLinkedRole"], "Resource": "*" } ] }
AWS Image Lambda SAM template with function URL
template.yml
file: ```yaml AWSTemplateFormatVersion: ‘2010-09-09’ Transform: AWS::Serverless-2016-10-31 Description: hello-app Parameters: environment: Type: String Default: development Description: Enter the name of cluster for deploy.Encrypting and decrypting data using OpenSSL
Note: You will be prompted for a password when encrypting or decrypt.
My 3 tips for speeding up Docker on Mac
1. Use VIRTIOFS
https://www.docker.com/blog/speed-boost-achievement-unlocked-on-docker-desktop-4-6-for-mac/
Setting default service version for Azure Blob Storage
If you are sharing plain text files with url pointing directly to Azure Blob Storage you will notice that the browser will try to display file content instead of downloading it.
Boost Your Efficiency as a Developer with These 3 Mac OS Hacks
Introduction: Being a developer on Mac OS can be enhanced by leveraging scripts, commands, and settings that optimize your workflow and boost your productivity. In this blog post, we will explore three valuable Mac OS hacks that can significantly improve your efficiency as a developer.
How to create parameterized rake task
I have a rake task that I want to parameterize. For example, I want to run it like this:
Define Dockerfile with AM64 platform on M1 Apple
Time over time I’m building docker images that can only be run on x64. To force M1 Mac
Configuring Docker to Use the Remote Host
To use the remote host as your Docker host instead of your local machine, set the DOCKER_HOST environment variable to point to the remote host. This variable will instruct the Docker CLI client to connect to the remote server.
WizzTree: New and faster WinDirStat
WizzTree is a new tool that is faster version of WinDirStat in collecting data about files and their sizes. I checked it on my samba share and it took 450 seconds to collect information about 1 million files. WinDirStat took 1.5 hours to collect the same information.
Creating binary image of pendrive using dd
I needed to create a binary image of a pendrive to be able to restore it later. I used
dd
command for that:About battery swaped EVs
Battery swapped EVs are new hot topic in the electric vehicle industry. Especially with NIO taking Norway by storm. But I think this technology might not look so bright as everyone portrays it.
Interesting libraries and tools - Episode 1
1. Ruby on Jets
https://github.com/boltops-tools/jets is a Ruby gem that provides a simple way to connect Your “rails-like” code into AWS Lambdas and Gateway using SAM (Serverless Application Model).
My Chrome extensions
Personal
- Grammarly
- SSL Everywhere
- Adblock Plus
- Imagus
- Wayback Machine
- (optional) Custom Javascript
- not as useful anymore
New Certification for Ruby 3
Ruby Association announced that it will be releasing a new certification for Ruby 3.0: https://www.ruby.or.jp/en/news/20220712
Mac Terminal Softwareupdate
softwareupdate --all --install --force xcode-select --install
Git Cheatsheet
git commit git add -A git push git pull git reflog git revert git reset --soft git reset --hard git log git stash git stash pop git stash apply git stash drop git checkout - git remote git remote set-url origin [email protected]:ipepe git push --force-with-lease git diff COMMITID > git.patch git apply git.patch git fetch git archive git archive -o latest.zip HEAD git bundle create file.bundle master git pull bundle master git push origin master git pull origin development --rebase git rebase -i git "hooks"
Timemachine + docker-compose + MacVLAN
I have fingally found some time to configure my local NAS to host my TimeMachine on separate ip address using macvlan, and heres that configuration:
Top 11 ways to speed up Rails app
1. goldiloader or ar_lazy_preload
Rails for a long time now has problem with N+1 queries. There were many attempts to merge PR automatic eager loading of relationships into Rails codebase but without much success. I recommend using these gems to solve this problem.
Tools for auditing Rails applications
- “Code reviewer”
- Static code analysis (lint/style)
- Rubocop
- MetricFu - includes most others
- Reek
- Flay - code similiarities
- RailsBestPractices
- Fasterer
- Debride
- RubyCritic
- https://github.com/CoralineAda/fukuzatsu
- https://github.com/amatsuda/traceroute - Find unused routes/controller actions
- https://github.com/seattlerb/flog
- grep
grep -ir "todo" app
grep -ir "has_and_belongs_to_many" app
- Template analysis/lint:
- erblint - Lints ERB or HTML files.
- haml-lint - Keeps HAML files clean and readable.
- markdownlint - Lints Markdown files.
- puppet-lint - Checks Puppet manifests conformity with the style guide.
- scss-lint - Lints SCSS files.
- slim-lint - Lints Slim templates.
- yard-junk - Lints YARD documentation.
- Static code analysis for security
- Gemfile analysis
- https://github.com/rubysec/bundler-audit - Patch-level verification for Bundler
- https://github.com/rubymem/bundler-leak - Gem memory leak checking
- https://github.com/appfolio/gemsurance - Gem vulnerability checker using rubysec/ruby-advisory-db
- https://github.com/nevir/Bumbler - find slow loading gems
- Check if gems are hosted on forks that can be pulled from under your own control.
- Upgrading rails
- n+1 detection
- Bullet gem + tests
- Code coverage
- SimpleCov + tests
- Production: https://github.com/danmayer/coverband
- Keep Your code coverage feedback loop short: https://github.com/grodowski/undercover
- Ruby version analysis
- https://github.com/civisanalytics/ruby_audit
- ORM+schema consistency check
- https://github.com/gregnavis/active_record_doctor
- https://github.com/trptcolin/consistency_fail
- https://github.com/plentz/lol_dba
- https://github.com/matthuhiggins/foreigner
- https://github.com/KevinColemanInc/yeet_dba
- https://github.com/djezzzl/database_consistency
- https://github.com/jenseng/immigrant
- https://github.com/ankane/strong_migrations
- Licensing check:
- license_finder - avoid GPL gems
Enhancing Your Ruby Code: A Retryable Wrapper
As we know, Ruby is a powerful and versatile language with a multitude of useful features that can simplify our coding life. Among these many aspects, one particularly invaluable feature is the ability to retry a block of code when an exception occurs. Today, I’ll be sharing with you my version of a Ruby Retryable Wrapper, designed to manage such retry operations seamlessly and efficiently.
Solve n+1 in Rails forever
There are multiple gems that can help you solve n+1 problems:
How to install pg on M1 Mac
If You have problem installing pg gem on M1 Mac, or other native extension You can try this:
brew install libpq
- helps with
nio4r
install
- helps with
gem install pg -v '0.18.4' -- --with-cflags="-Wno-error=implicit-function-declaration"
- brew install v8-315
- gem install therubyracer -v ‘0.12.2’ – –with-v8-dir=/usr/local/opt/[email protected]
Fun fact: Daily Earth rotation is 360.98 degrees
Earth rotates 360.98 degrees in 24 hours, and one programmer in NASA made a bug in the algorithm assuming its 360 degrees which resulted in Gemini 5 capsule drifting from the expected landing location. Source: https://drewexmachina.com/2015/08/21/eight-days-or-bust-the-mission-of-gemini-5/#attachment_2739
How to setup different git email per directory basis
Sometimes it is necessary to have different git email per directory basis.
Transfering Docker Images Between Machines
- Saving compressed docker image for local transfer to other server
docker build -t imgname . && docker save imgname | bzip2 > imgname.bz2
- Transfering compressed docker image to other server
scp user@server:/imgname.bz2 ~/imgname.bz2
- Loading compressed docker image into local images
bzcat imgname.bz2 | docker load
- Saving compressed docker image for local transfer to other server
My Quick Graphing Toolset
To quickly create graphs and charts, I use a tool called Mermaid on website: https://mermaid.live/
Post Mortem Quick Guide
Last year I did incident post mortem based on Atlassian’s article. To keep most juicy part of it as my personal copy I put the table here:
How to use tmpfs with Docker Compose and MySQL
I recently needed to run a MySQL database on a tmpfs (RAM disk) filesystem with docker compose, it allowed me to have pretty good tests performance in my client’s Rails application. It can be achieved quite easily with this config:
How to stub Paperclip in RSpec for Pleasure
I have a lot of models with images in one of my Rails applications. And recently I optimized my tests execution time by simply stubbing Paperclip:
module Paperclip class Attachment def post_process; end end def self.run(cmd, arguments = '', interpolation_values = {}, local_options = {}) cmd == 'convert' ? nil : super end end
How to setup swapfile on Ubuntu VM
sudo fallocate -l 2G /swapfile2gb sudo chmod 600 /swapfile2gb sudo mkswap /swapfile2gb sudo swapon /swapfile2gb sudo cp /etc/fstab /etc/fstab.bkp_before_swap_config echo '/swapfile2gb none swap sw 0 0' | sudo tee -a /etc/fstab sudo sysctl vm.swappiness=10 sudo sh -c "echo 'vm.swappiness=10' >> /etc/sysctl.conf"
3D Printer Materials Comparision
Name PLA ABS PETG TPU Nylon Printing temperature 180-230°C 210-250°C 200-260°C 190-245°C 220-230°C Printing bed temperature 20-60°C 80-110°C 80-90°C 60-90°C 70-100°C Printing bed Optional Necessary Optional Optional Necessary Bed Adhesion Medium Medium Bad (use blue tape/PEI) Bad (use blue tape/PEI) Fumes Few to none Harmful Harmful Few to none Few to none Absorption of moisture ✔ ✔ ✔ ✔ ✔ Strength Medium Good Very good Very good Good Flexibility Bad Medium Good Perfect Good Heat Resistance Bad Medium Good Good Bad UV resistance Medium Medium Medium Good Good Water Resistance Medium Medium Good Good Medium Biodegradable Partly ✘ ✘ ✘ ✘ Recyclable ✔ ✔ ✔ ✔ ✘ Gluing and Painting Possible Possible Possible Possible Possible Acetone Treatment Not possible Possible Not Possible Possible Possible Cost Low Medium Medium Medium High Toxicity Low Medium Low Low High Odor None Strong Strong Strong Strong Strength Medium Good Very good Very good Good Flexibility Bad Medium Good Perfect Good Heat Resistance Bad Medium Good Good Bad UV resistance Medium Medium Medium Good Good Water Resistance Medium Medium Good Good Medium Biodegradable Partly ✘ ✘ ✘ ✘ Recyclable ✔ ✔ ✔ ✔ ✘ Dumping and Loading Postgres Database
I recently needed to copy staging database from Heroku to my local machine.
Find 10 most commonly changed files in git repo
git log --pretty=format: --name-only | sort | uniq -c | sort -rg | head -10
How to check Mac serial number in terminal
system_profiler SPHardwareDataType | grep Serial
ioreg -l | grep IOPlatformSerialNumber
ioreg -rd1 -c IOPlatformExpertDevice | awk -F'"' '/IOPlatformSerialNumber/{print $4}'
Creating new text file action in Mac OS
I really miss option of creating new text file in Mac OS in simple way like Windows offers on right click.
Why EV drivers are better planners
I recently bought an EV, which was a pretty brave decision. For EVs main problem is infrastructure, it’s a paradox because without cars there is no incentive to build chargers, and without chargers there is no incentive to buy EVs.
ZFS Compression Cheatsheet
- zfs snapshot charliez@2021-11-16
- zfs set compression=lz4 charliez
- zfs get compressratio charliez
- zfs-recompress.sh
- zpool iostat
- zfs list -t filesystem -o space
- sudo zfs list -t snapshot
Ruby and Shell are BFF
Ruby is a scripting language, here’s a nice tutorial on how to use it in conjunction with the shell. I recommend that you go through the introduction chapter and the tasks in it, the rest of it can be referred to if you need something more in the future.
ImageMagick example commands
convert IMG_0761.HEIC -resize 50% IMG_0761.png
convert image.png -fuzz 10% -transparent white image_new.png
convert image.png -strip -resize 1024x1024 image_new.jpg
convert background.png logo.png -geometry +0+1000 -composite -crop 5600x5600+0+0 -strip -resize 40% splash.png
Fixing LetsEncrypt Root Cert
To fix certificate issue on Ubuntu 16.04:
sed -i '/^mozilla\/DST_Root_CA_X3/s/^/!/' /etc/ca-certificates.conf && update-ca-certificates -f
Ventoy - simplest way to boot ISO from USB Pendrive
Lessons from biggest Rails monolith
Cookpad is/was one of biggest rails monoliths and it is one of most succesful monoliths in Rails.
Squeeze out last performance drop for MacBooks
1. Tone down the visual effects
Design patterns catalog
All basic design patterns: https://refactoring.guru/design-patterns/catalog
Redis University
Learn some new tricks with offical Redis University: https://university.redislabs.com/courses/ru101/
Recommended wall thickness for 3D Printed cases
Thickness Feel 1mm Walls are elastic 2mm Smallest ridgid thickness 3mm Sturdy and optimal Types of Electric Bikes Homologations in Poland
Homologations:
- L1 - restriction, i.e. up to 45 km / h, i.e. without a driving license
- L3 - up to 52 km / h - for a category B driving license (over 3 years old) and A1
- L3e - up to 67 km / h - category A1
iPad screen mirroring on Mac with QuickTime
The pros of mirroring with QuickTime are many. It doesn’t cost anything extra, the responsiveness is almost instant, and setting it up couldn’t be easier.
Docker Start Ruby container with specific Version
Sometimes You want to keep Your local machine clean, You want to test something or do a quick bundle update or anything else. In situations like that You can quickly spin up docker container mounted to local directory with:
docker run -it --volume (pwd):/app ruby:2.3.7 /bin/bash
Advanced Distributed Systems Design is avaiable for free for 90 days
A cut down version of Udi’ Advanced Distributed System Design is available for free for 90 days: https://learn.particular.net/courses/distributed-systems-design-fundamentals-online
Exposing Your Local Development Server to the Internet with NGROK
As developers, it’s common to need to share our in-progress work with colleagues or clients who don’t have direct access to our local development environment. Luckily, this is where NGROK shines.
What I learned about serverless while trying to write free online converter?
Some time ago I found C++ binary to convert files from STL to STP (STL is basically raster for 3D models, while STP is Vector).
My Dockercon recommended talks
My Top 9 recommended talks from 2021 Dockercon
How to record audio with screen in QuickTime
Install background music
With brew:
brew install --cask background-music
Transfering GIT repository between machines
Sometimes when working in very unique teams and scenarios, You need to transfer git changes between machines without using common server.
Building a Powerful Crawler using Javascrit in the Cloud
Introduction: Web crawling and data extraction from websites are essential tasks in today’s data-driven world. JavaScript cloud crawlers offer a convenient and scalable solution for efficiently collecting and processing data from the web. In this blog post, we will explore an example of a JavaScript cloud crawler using the popular GSM Arena website.
CLI to Query CSV and JSON files
CLI tool that can execute SQL queries on CSV, LTSV, JSON and TBLN. Can output to various formats.
Teamviewer Alternative - Windows Quick Assist
The quickest way to start Quick Assist is to use a keyboard shortcut. Hold the Windows Key and the Control (Ctrl) key down, then press Q. In other words, Win + Ctrl + Q.
MIMEMAGIC dependency issue in rails
Hey. I don’t know if You have already seen: https://github.com/rails/rails/issues/41750 but it causes failed builds.
Ruby on Rails PAAS solutions
Heroku.com
Still one of most stable and mature PAAS solutions for ROR.
My Install of Ruby Development Environment
- Install rbenv (https://github.com/rbenv/rbenv#basic-github-checkout)
- If You don’t have git on Your Mac, You need to run:
xcode-select --install
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
cd ~/.rbenv && src/configure && make -C src
- this is optional, it compiles bash exstension
mkdir -p ~/.rbenv/plugins
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
- Add to ~/.bash_profile
export PATH="$HOME/.rbenv/shims:$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
- reload terminal window
rbenv install 2.3.1
rbenv global 2.3.1
- If You don’t have git on Your Mac, You need to run:
- Install nodenv (https://github.com/nodenv/nodenv#basic-github-checkout)
git clone https://github.com/nodenv/nodenv.git ~/.nodenv
cd ~/.nodenv && src/configure && make -C src
- this is optional, it compiles bash exstension
mkdir -p ~/.nodenv/plugins
git clone https://github.com/nodenv/node-build.git ~/.nodenv/plugins/node-build
- Add to ~/.bash_profile
export PATH="$HOME/.nodenv/bin:$HOME/.nodenv/shims:$PATH"
eval "$(nodenv init -)"
- reload terminal window
nodenv install 8.11.3
nodenv global 8.11.3
- Install Postgres desktop App for Mac
- https://postgresapp.com/
- Add to ~/.bash_profile
export PATH=$PATH:/Applications/Postgres.app/Contents/Versions/latest/bin
- Run SQL queries:
- In Postgres app double click on “postgres databas”
- OR run in terminal:
/Applications/Postgres.app/Contents/Versions/13/bin/psql -p5432 "postgres"
CREATE USER webapp WITH PASSWORD 'webapp';
ALTER USER webapp WITH SUPERUSER;
brew install imagemagick
- install Docker desktop for Mac
- https://www.docker.com/products/docker-desktop
docker run -p 6379:6379 --restart=unless-stopped -d --name redis redis:alpine
- In project repository
gem install bundler:1.17.1
- optionally
rbenv rehash
bundle install
rbenv rehash
rails db:create
rails db:migrate
rails db:seed
rails server
rails console
- ie: User.first
- ie: User.count
- ie: User.first.update(email: ‘[email protected]’)
- Install rbenv (https://github.com/rbenv/rbenv#basic-github-checkout)
TOP 10 Rules for Microservice Architecture success
No. 10) Tooling
Prefer one well-established tech stack. Too many tools often result in unintended complexity across the board.
prosopite - new bullet gem alternative
I recently got an email from author of new gem - prosopite. A better way to detect n+1 queries in Your ruby on rails applications. I heven’t tried it yet, but it looks very promising.
Brother MFC-L3750CDW blocked out of toner
Brother printers from series MFC-L3750CDW have this annoying feature that when you run out of toner, it locks You out of printing. There is simple fix how to reset toner level counter (this will not refill Your toner) that will allow You to use Your toner to every last bit.
How to use SSH as HTTP SOCKS proxy on Mac OS
SSH command
Debugging ActiveRecord SQL Queries with Backtraces
hijacking logger
config.log_level = :debug
Rails.logger = Logger.new(STDOUT)
ActiveRecord::Base.logger = Logger.new(STDOUT)
Setting up VM for Rails docker pnpr container
I created
pnpr
docker image that I use for rails appplication hosting. In this blog post I will provide introduction on how to set up VM for Rails hosting.Setting Up ZeroTier for VPN-Based Deployments
If you recall the popular virtual private network (VPN) solution, Hamachi, you’ll be pleased to know there is an even more powerful option available now: ZeroTier. This robust VPN solution is perfect for connecting any two computers via the internet.
What I learned while writing web Samba client
I recently started working on project for a web based client of samba share. I want to use it for Chromecast streaming of
Setup multiple git and ssh identities
Sometimes when You have multiple ssh identities You need to manage which git repository uses which key. This post will try to help You with that problem.
Operating SSH-ADD command
add private key to keychain
ssh-add -K ~/.ssh/[your-private-key]
Programmer Challenge: SQL Murder Mystery
I recently found out about: http://mystery.knightlab.com/
How to speed up time machine backup
In terminal enter:
sudo sysctl debug.lowpri_throttle_enabled=0
Single file ruby script with library dependecies
I often need to write a single file with external library dependecies for quick conversion or transforming of data. Heres a starter template:
Compressing STDIN and STDOUT with BZIP2
Sometimes You might need to compress something but You are not sure how to do it. Well, there are few tricks that bzip2 has up it’s sleave.
You should have multiple language versions
When You start programming, You usuallly set up newest version of Your programming language of choice. And that is good, but only in the beginning. Once You start working on multiple projects, You will notcie that they might depend on different version of Your language. At first You might try to update all projects to same version, but it’s a good idea only in the beginning. Some times You might want to run only one time a code that was written for different version of Your programming language and You don’t want to update it to newest one. Or You might want to check out newest features but without reinstalling language each time You want a different version.
Using curl? But not using jq?
jq
is command line utility, written C. That formats json and is really handy tool when working with curlCloning Your Windows system to new drive with Acronis
Every now and then You get a new drive and You wonder if You really need to reinstall everything on Your windows computer. Well there is a solution that I recommend every time: Acronis.
Why sequencing migrations in Rails is bad idea?
Recently I wrote quite big and extensive database migration in Rails. (ie.
1000_restructure_users.rb
) In code review I have got a suggestion to split it into parts. And so I did:999_add_new_columns.rb
1000_migrate_data_in_users.rb
1001_remove_old_columns.rb
AI Code completion plugin for IDEs - Kite.com
Hey. https://Kite.com/ recently started advertising it’s feature and I thought about it’s interesting offer and bought myself one month to test how it works.
Ruby type casting for beginners
input type input example value method output type output example value integer 270 to_s string “270” string “270.1-somehitng” to_i integer 270 string “270.1-something” to_f float 270.1 Best code editor for web - ACE Editor
If You need to create a code editor in HTML, I recommend ACE editor. It feels really responsive, has many languages syntax support. Overall look and fell is very enjoyable.
I received my designed PCB Protoboard V2
I finally received V2 of my PCB Design for use with ESP32 microcontrollers. It should be perfect for servo based robots but also other projects as well.
Dream project: WiFi hacking with GSM and Cloud
Another “Dream project” idea.
Bad idea: buy 100 HDDs and try to recover data from them
For a few years I’m fighting with spending some $$$ on a lot of damaged HDDs.
AWS has ARM based servers?
Who knew? Well, I didn’t until today.
Looking for Ruby tests demo video
I need help finding a video/gem/prototype of specific library that I remeber watching a demo of.
Why software engineers shouldn't buy new M1 MacBooks?
As always when something new and shiny comes out, it’s really hard not to be under impression that new something is better and if I had that new something, I would operate much more efficiently.
Cross-Platform "Air-Drop" like solutions
If You need to send something quick without pendrive or through internet but worried about uploading it to some file hosting websites.
Interesting and recommended Aliexpress products
Recommended that I bought
- USB Router Fan
- https://pl.aliexpress.com/item/32686594761.html
- SATA to PCI-E cards
- I bought this: https://pl.aliexpress.com/item/32785294359.html
- But this one is cheaper: https://www.aliexpress.com/item/32795175437.html
- MacBook Pro Fans
- https://www.aliexpress.com/item/32991236240.html
- USB Router Fan
How to setup global gitignore
Introduction:
Fresh Macbook Install
When I need to reinstall my MacBook, I go through checklist below to make sure I have everything set up for work
Three things you need to know to produce an accurate estimate
This post actually was created by Rahoul Baruah on September 8, 2015. Unfortunately Rahoul’s blog is unavailable that’s why I remade it. Sources avaialbe at the end of post.
LILYGO® TTGO T-Watch-2020 ESP32 Main Chip 1.54 Inch Touch Display Programmable Wearable
I recently stumbled upon a cool smartwatch microcontroller for cheap!
You should lint Your factories
In RSpec I often encounter projects where Factories are not being linted. This is important, because tests may pass, but once You start writing new functionality it may occur that factory is invalid. Quick snipped for all of You that want to start linting:
RSpec: Find all files with word in path
Fish shell:
rspec (find spec/**/*_spec.rb | grep user)
In case You wanted to ignore Mac OS X updates.
Apple deprecated ignoring specific updates. How nice of them…
Building a PC tips
When building a PC, choosing a motherboard can be quite tricky. Fortunately if You know what fetures are You looking for You can use
RealWorld app!
Today I stumbled upon https://github.com/gothinkster/realworld ! This is great undertaking and I highly recommend anyone to take a look into that
JetBrains commercial coupon for 20% off
CR44E-866PS-4FFY3-T84ST-4Q3V3
Thermalpading my 2015 2,2GHz Macbook Pro
Results are not promising. Overall chasis temperature increased on the bottom cover and that is highly unpleasant. CPU Temperature at stress didn’t lower that much (to 78°C from 81°C), barely anything in my opinion.
Ruby on Rails Pyramid Architecture/Structure
For some time now I needed a “diagram” that shows how Rails Applications are structured. And how patterns are interacting with other building blocks of Rails. There are no fancy colors and it is pretty basic but it shows
How to spot a fake MacBook charger?
In recent year I went through quite few MacBook chargers. Some of them died randomly, some of them had their cables being shreded because of age and frequent usage.
How to install ZFS on Ubuntu Server
sudo apt-get install zfsutils-linux
- install ZFSsudo fdisk -l
- find the disk You want to use for ZFSzpool create -f ztank raidz2 /dev/sdg /dev/sdc /dev/sdb /dev/sdf /dev/sdh
zpool status
- check statuszpool list
- check statuszfs set compression=lz4 ztank
- set compressionzfs set atime=off ztank
- disable atime
Denso Cruise Control Throttle Controller
I bought a Denso MX100300-1170 throttle cable control motor from an Accord 1.8 from 1998. Used to operate throttle body with steel cable. It is factory-controlled with proprietary Honda module.
How to install pg gem with Postgress.app
If You are working on MacBook with M1 processor and getting this error or similiar:
(no such file), '/usr/lib/libpq.5.dylib'
Best Resource on Writing Rails Apps
For a long time I was wondering how rails apps should be written. Until I found this handbook: https://github.com/infinum/rails-handbook/tree/7f4cd9258c116bd9a4c45b709f392db3b1524e8e
TruffleRuby - A new chapter for Ruby?
I recently found out about TruffleRuby project. Project describes itself as:
A high performance implementation of the Ruby programming language. Built on the GraalVM by Oracle Labs.
It uses GraalVM:
GraalVM is a high-performance runtime that provides significant improvements in application performance and efficiency which is ideal for microservices.
And is based on Polyglot engine:
The Polyglot engine of the GraalVM allows the execution and interoperability of language interpreters for additional programming languages. This release of the GraalVM contains language interpreters for five well-known languages (JavaScript, Python, Ruby, R, and LLVM), and a teaching language (SimpleLanguage).
Flat file structure in Paperclip + UFS = Disaster
Introduction: Today, while working on my Ruby on Rails application, I encountered an interesting file storage problem. The filesystem returned an “Input/output error” when attempting to upload a user attachment. It’s important to note that my attachments are accessible via NFS, with the share hosted on FreeBSD. After searching for information on the “file limit of UFS,” I couldn’t find any relevant results. Frustrated, I turned to my trusted ##techsupport IRC channel for help. Fortunately, a user named
@PipeItToDevNull
provided a valuable answer, directing me to this link: link.
subscribe via RSS