<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>/ root</title><link>https://jinyuz.dev/</link><description>Recent content on / root</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Sun, 15 Sep 2024 23:24:42 +0800</lastBuildDate><atom:link href="https://jinyuz.dev/index.xml" rel="self" type="application/rss+xml"/><item><title>Journey 25</title><link>https://jinyuz.dev/logs/journey-25.log/</link><pubDate>Sun, 15 Sep 2024 23:24:42 +0800</pubDate><guid>https://jinyuz.dev/logs/journey-25.log/</guid><description>Highlights # Got offered half of the price agreement we had for the OSS project but it&amp;rsquo;s okay since I&amp;rsquo;ll be paid to learn I&amp;rsquo;m still having problems with my sleeping schedule. Can&amp;rsquo;t seem to sleep earlier than 2AM. Got my Tonik Bank debit card Got to learn more Golang stuffs Contemplating on subscribing to GPT-4 or Claude. It&amp;rsquo;s still $20 and I&amp;rsquo;m still able to utilize the free chat they provide Got to go out with my SO and walk around :) Got to make a simple point system calculator for Beyblade X!</description></item><item><title>Journey 24</title><link>https://jinyuz.dev/logs/journey-24.log/</link><pubDate>Sun, 08 Sep 2024 23:57:26 +0800</pubDate><guid>https://jinyuz.dev/logs/journey-24.log/</guid><description>Highlights # Celebrated my birthday 🎉 Got a Ukelele Got offered to work on an open source project. But this is still something that isn&amp;rsquo;t sure coz I&amp;rsquo;m still not paid, and I can get ditched anytime. Father visited, and we ate at SM food court Bought 2 Beyblades after seeing posts about it on social media. My inner child got excited and bought more of it the next day, and ordered a stadium online as it was on sale.</description></item><item><title>Journey 23</title><link>https://jinyuz.dev/logs/journey-23.log/</link><pubDate>Sun, 01 Sep 2024 00:04:38 +0800</pubDate><guid>https://jinyuz.dev/logs/journey-23.log/</guid><description>Highlights # Got contacted for the open-source project Had my bike repaired Submitted a talk to PyCon Mini for .pex files</description></item><item><title>Journey 22</title><link>https://jinyuz.dev/logs/journey-22.log/</link><pubDate>Sun, 25 Aug 2024 20:22:22 +0800</pubDate><guid>https://jinyuz.dev/logs/journey-22.log/</guid><description>Highlights # Had a meeting with one of the clients at my current job, and it horrendously failed. Well, we were expecting it to fail at some point since it was still in beta, but it failed at the first attempt because of the number of characters. Changed from presenterm to sli.dev for my talk. It didn&amp;rsquo;t have a code runner, but I just improvised and moved on. Good thing I had a back up ready as I didn&amp;rsquo;t want to mess up my first ever public talk.</description></item><item><title>Journey 21</title><link>https://jinyuz.dev/logs/journey-21.log/</link><pubDate>Sun, 18 Aug 2024 23:22:04 +0800</pubDate><guid>https://jinyuz.dev/logs/journey-21.log/</guid><description>Highlights # Refined my talk around python metaprogramming I didn&amp;rsquo;t expect it to be this complicated for a topic that you aren&amp;rsquo;t going to use 99% of the time :/ Got accepted to be a volunteer for PyCon Mini Want to submit a talk about navigating through a python code base but I&amp;rsquo;m still hesitant as it might not be of &amp;ldquo;trend&amp;rdquo;</description></item><item><title>Journey 20 - Talk, Meditation, Infuriated</title><link>https://jinyuz.dev/logs/journey-20.log/</link><pubDate>Sun, 11 Aug 2024 23:22:04 +0800</pubDate><guid>https://jinyuz.dev/logs/journey-20.log/</guid><description>Highlights # Talk about Metaprogramming got accepted and will be presenting on August 23, 2024 Did my initial preparations for the talk. Somewhat got complicated since I&amp;rsquo;m not entirely sure how to make it interactive Preparations for a simple talk is not so simple as I thought it would. Started going back into meditation. I considered purchasing the Balance app, but it was expensive, so I tried looking for alternatives and found Medito.</description></item><item><title>Journey 19 - Movie Date</title><link>https://jinyuz.dev/logs/journey-19.log/</link><pubDate>Sun, 04 Aug 2024 23:21:52 +0800</pubDate><guid>https://jinyuz.dev/logs/journey-19.log/</guid><description>Highlights # Date night on Sunday. Tried out some new kicks. Watched Deadpool with SO Started using Elevate for brain training Discovered how to open inhalers to add custom essential oils</description></item><item><title>Journey 18 - Distractions</title><link>https://jinyuz.dev/logs/journey-18.log/</link><pubDate>Sun, 28 Jul 2024 23:54:11 +0800</pubDate><guid>https://jinyuz.dev/logs/journey-18.log/</guid><description>Distractions #Lately, I&amp;rsquo;ve been getting distracted more and more. I&amp;rsquo;ve been comparing myself to others, a lot.
I really need to go back into writing, reading, and meditating. I feel that I&amp;rsquo;d end up wanting to have another week or 2 for a vacation.
I attended a community meetup for AWS today, and the topics were interesting since it was related to RAGs and machine learning. Got to meet some old acquaintances as well.</description></item><item><title>Journey 17 - Realizations</title><link>https://jinyuz.dev/logs/journey-17.log/</link><pubDate>Sun, 21 Jul 2024 23:54:11 +0800</pubDate><guid>https://jinyuz.dev/logs/journey-17.log/</guid><description>Realizations #I just realized what I wanted to work on the most. Stuffs like developer tools, cli applications, or probably anything that is close to the developer.
I&amp;rsquo;ve been a user of those tools, and made some tools myself such as gitpad. Though that one was just specific for neovim.
I probably still want to do some web development work but I guess what I want to work on longer is devtools.</description></item><item><title>Journey 16 - Void</title><link>https://jinyuz.dev/logs/journey-16.log/</link><pubDate>Sun, 14 Jul 2024 23:58:30 +0800</pubDate><guid>https://jinyuz.dev/logs/journey-16.log/</guid><description>Void #Can&amp;rsquo;t remember what happened during this week. Putting things off kinda sucks. Based on last week&amp;rsquo;s log, I&amp;rsquo;m just finishing things off from my talk about meta programming in python.
I just named this Void, using the reference in One Piece where there were 100 years of history missing.
If my memory serves me right, this was also the week in which we were supposed to have a family reunion.</description></item><item><title>Journey 15 - Slowing Down</title><link>https://jinyuz.dev/logs/journey-15.log/</link><pubDate>Sun, 07 Jul 2024 23:26:43 +0800</pubDate><guid>https://jinyuz.dev/logs/journey-15.log/</guid><description>Slowing Down #It&amp;rsquo;s now coming to a point where I don&amp;rsquo;t know what I want to do with my life. I want to keep on writing my thoughts, or at least what has happened during the week, but I&amp;rsquo;m slowly losing interest.
This week, I extended my leave up to Wednesday just because I didn&amp;rsquo;t feel like working on Monday and Tuesday.
I was kinda finishing a presentation for my talk related to Python metaprogramming.</description></item><item><title>Journey 14 - Graduation, Break, Mindanao Summit</title><link>https://jinyuz.dev/logs/journey-14.log/</link><pubDate>Sun, 30 Jun 2024 00:32:44 +0800</pubDate><guid>https://jinyuz.dev/logs/journey-14.log/</guid><description>Graduation #Had a lot of events that happened this week. My father just graduated from his PhD in Political Administration and my younger sister graduated in Bachelor of Science in Pharmacy.
Parents came to visit last Tuesday, and we went out to eat at a buffet. I had an annoying errand to look for a buffet, and we ended up eating somewhere that was readily available.
The food was just so-so, and only had 4 variety and costed us around P8500.</description></item><item><title>Journey 13 - DurianPy II, Neglected</title><link>https://jinyuz.dev/logs/journey-13.log/</link><pubDate>Sun, 23 Jun 2024 23:29:09 +0800</pubDate><guid>https://jinyuz.dev/logs/journey-13.log/</guid><description>DurianPy II #I just attended the second event for DurianPy. Actually, it was on a whim that I decided to attend just because I had nothing important to do.
The event went well, and I got to connect to new devs.
Oh, I forgot to mention that I was told that I&amp;rsquo;d be speaking for the next meet up. That got me quite excited but anxious at the same time since I don&amp;rsquo;t even know if people would want to listen to my talk.</description></item><item><title>Journey 12 - Unfinished, Consistency, Randoms</title><link>https://jinyuz.dev/logs/journey-12.log/</link><pubDate>Sun, 16 Jun 2024 23:42:56 +0800</pubDate><guid>https://jinyuz.dev/logs/journey-12.log/</guid><description>Unfinished #I had been shutdown for around 3-4 days since I had a fatigue. I guess that&amp;rsquo;s the result of sleeping 2:00 in the morning for consecutive weeks.
I&amp;rsquo;ve been procrastinating on my work lately. I just watched another video where it says that you aren&amp;rsquo;t lazy, things are just boring. And that&amp;rsquo;s probably right. Things have been getting quite boring lately to the point where I don&amp;rsquo;t even have the motivation to finish it.</description></item><item><title>Journey 11 - Motivation, Reset, Fatigue</title><link>https://jinyuz.dev/logs/journey-11.log/</link><pubDate>Wed, 05 Jun 2024 13:41:52 +0800</pubDate><guid>https://jinyuz.dev/logs/journey-11.log/</guid><description>Motivation #I had been watching Haikyuu for the past week as I just wanted a some sort of refresher before watching The Dumpster Battle.
There were a lot of quotable quotes in the anime.
Little by little, what you&amp;rsquo;ve begun will naturally become important to you.
What you need at the start is a little bit of curiosity.
Kiyoko Shimizu
A lot of us could relate to this. You can&amp;rsquo;t say that you don&amp;rsquo;t like something unless you&amp;rsquo;ve tried it.</description></item><item><title>Journey 10 - Backup, Nostalgia, Running</title><link>https://jinyuz.dev/logs/journey-10.log/</link><pubDate>Sun, 02 Jun 2024 22:51:55 +0800</pubDate><guid>https://jinyuz.dev/logs/journey-10.log/</guid><description>Backup #I&amp;rsquo;ve been contemplating on getting another laptop as my backup in case something goes wrong again with my current Macbook.
Facebook Marketplace has a lot of cheap laptops so it was just a matter of what model and specs to choose.
I ended up buying a Lenovo ThinkPad T480 which was the most recommended laptop in /r/thinkpad, but with the i5 8th Gen 16GB variant.
It came with a windows operating system and I&amp;rsquo;m planning to install a Linux based distribution to it.</description></item><item><title>Journey 9 - Utterless, Duties, Ricing</title><link>https://jinyuz.dev/logs/journey-9.log/</link><pubDate>Sun, 26 May 2024 23:59:54 +0800</pubDate><guid>https://jinyuz.dev/logs/journey-9.log/</guid><description>Utterless #I had a message from a recruiter saying that their client was looking for a Senior Python Engineer. I promptly submitted my updated CV since nothing could go wrong if I applied.
It was my first interview in the last 2 years, so I admit that there probably hasn&amp;rsquo;t been any improvements in my interviewing skills.
I thought I had prepared, but I guess it wasn&amp;rsquo;t enough. I was rendered speechless when I was asked on what questions would I ask if there was a client that wanted a ticketing system?</description></item><item><title>Journey 8 - Autobots, Window Manager, &amp; Falls</title><link>https://jinyuz.dev/logs/journey-8.log/</link><pubDate>Sun, 19 May 2024 20:09:54 +0800</pubDate><guid>https://jinyuz.dev/logs/journey-8.log/</guid><description>Autobots #AI has been a thing for quite a while since the release of OpenAI. Almost every product nowadays uses it in someway, and if you are not, then you&amp;rsquo;re probably gonna get left behind.
I was recently assigned a task which I think is quite complicated (at least for me) of implementing a design where we generate a workflow compatible with the current product we&amp;rsquo;re building to make on boarding new users seamlessly.</description></item><item><title>Journey 7 - DurianPy, Speaking, Burnout</title><link>https://jinyuz.dev/logs/journey-7.log/</link><pubDate>Sun, 12 May 2024 23:08:07 +0800</pubDate><guid>https://jinyuz.dev/logs/journey-7.log/</guid><description>DurianPy #It has been almost 6-7 years since I heard of this local community of Python/Django enthusiasts. Unfortunately, it has been inactive when I started working.
It was a good thing that someone stepped up and became the community lead since there isn&amp;rsquo;t much activity with Python in my area.
I was able to attend, learned a few things about Python, and connected with seasoned and new developers.
There were also some developers that were using neovim but I didn&amp;rsquo;t really get to see their setup and how they use it since it was more of a python event.</description></item><item><title>Journey 6 - Server Crash, Painknee$, Sleepless</title><link>https://jinyuz.dev/logs/journey-6.log/</link><pubDate>Sat, 04 May 2024 11:03:28 +0800</pubDate><guid>https://jinyuz.dev/logs/journey-6.log/</guid><description>Server Crash #I just experienced one of the worst things that could happen during a development process &amp;ndash; the API client I was using 1 just went down. You can&amp;rsquo;t use it 2.
Before that, you could use the app even when you were offline. But late September of 2023, they announced that they would require users to login in order to use the app. I did like it especially the cloud sync feature, but not to the extent that I can&amp;rsquo;t use the app if your servers are offline!</description></item><item><title>Journey 5 - Brain Fog, Logs, Stroll</title><link>https://jinyuz.dev/logs/journey-5.log/</link><pubDate>Sun, 28 Apr 2024 12:44:41 +0800</pubDate><guid>https://jinyuz.dev/logs/journey-5.log/</guid><description>Brain Fog #I feel like I have not been performing at my best in the past 6 months~ or so. It might have to do with the habits I&amp;rsquo;ve built when I stopped meditating.
I recently saw a post that in order to combat brain fog, you can try using your non-dominant hand for simple tasks such as brushing your teeth, writing with a pen, or using it with a mouse.</description></item><item><title>Journey 4 - Golang, Micro-Optimization, Will of D</title><link>https://jinyuz.dev/logs/journey-4.log/</link><pubDate>Sun, 21 Apr 2024 14:02:19 +0800</pubDate><guid>https://jinyuz.dev/logs/journey-4.log/</guid><description>Golang #I have been deferring learning Golang for quite a few months now, or probably even year until I saw YouTube videos of AnthonyGG that got me interested in learning it again.
Probably what piqued my interest in Golang was that I had a task at work that relied on websockets and I had an implementation of it using Python/Django. I tried implementing our current implementation in Django into FastAPI and that seemed to clear some things that I have been doing wrong in the Django implementation.</description></item><item><title>Journey 3 - Rule of three, Tax, Hiking</title><link>https://jinyuz.dev/logs/journey-3.log/</link><pubDate>Sun, 14 Apr 2024 22:15:17 +0800</pubDate><guid>https://jinyuz.dev/logs/journey-3.log/</guid><description>Rule of three # When you don&amp;rsquo;t know what you want to do, write.
Just one of the things I saw on social media this week that makes me realize why I&amp;rsquo;m doing this. It&amp;rsquo;s to provide me direction into the life I&amp;rsquo;ve always wanted. And for that to happen, I need to write down my thoughts in order to understand myself better.
Also, I didn&amp;rsquo;t realize that I&amp;rsquo;m kind of applying the Rule of three for creating titles for my post every week.</description></item><item><title>Journey 2 - Insomnia, Semantics, Wheels &amp; PyPI</title><link>https://jinyuz.dev/logs/journey-2.log/</link><pubDate>Sun, 07 Apr 2024 23:33:58 +0800</pubDate><guid>https://jinyuz.dev/logs/journey-2.log/</guid><description>I&amp;rsquo;m not in the mood of writing today since I&amp;rsquo;m going through some sort of phase in my life. Nonetheless, I&amp;rsquo;ve tried to force my self to start getting into writing just so I won&amp;rsquo;t lose my streak.
I think I&amp;rsquo;d also need some kind of scratch pad or idea pad where in I could put random topics that come out during the week so I could have some idea on what to write on my weekly journal.</description></item><item><title>Journey 1 - Wheels, Streaming, and Holidays</title><link>https://jinyuz.dev/logs/journey-1.log/</link><pubDate>Sun, 31 Mar 2024 21:25:14 +0800</pubDate><guid>https://jinyuz.dev/logs/journey-1.log/</guid><description>I couldn&amp;rsquo;t think of a good title1 and I don&amp;rsquo;t even know whether I should continue creating one but I guess it&amp;rsquo;s quite fun and gives me a little bit of a summary of what I did that week2.
Wheels #Before I ended my week, I was able to migrate one of my projects from heroku to render. It only needed a few line changes and I was up and running.</description></item><item><title>Journey 0 - Reboot</title><link>https://jinyuz.dev/logs/journey-0.log/</link><pubDate>Sun, 24 Mar 2024 19:10:02 +0800</pubDate><guid>https://jinyuz.dev/logs/journey-0.log/</guid><description>It&amp;rsquo;s been a while since I last posted in my webspace. A lot has happened over the past 2-3 years, I guess.
Especially during covid where I felt like I lost 2 years of my life being locked inside the house I was renting in.
I even remember we had to obtain permits just to go outside and we were only allowed on specific schedules (Monday, Wednesday, Saturday), and had to use face mask and face shield.</description></item><item><title>Installing Psycopg2 in Macos</title><link>https://jinyuz.dev/posts/installing-psycopg2-in-macos/</link><pubDate>Fri, 29 Jul 2022 08:45:15 +0800</pubDate><guid>https://jinyuz.dev/posts/installing-psycopg2-in-macos/</guid><description>TL;DR #env LDFLAGS=&amp;#34;-I/usr/local/opt/openssl/include -L/usr/local/opt/openssl/lib&amp;#34; pip install psycopg2 # OR env LDFLAGS=&amp;#34;-I/usr/local/opt/openssl@3/include -L/usr/local/opt/openssl@3/lib&amp;#34; pip install psycopg2 # OR # https://github.com/brianmario/mysql2/issues/795#issuecomment-337006164 env LIBRARY_PATH=&amp;#34;/usr/local/opt/openssl@3/lib&amp;#34; pip install psycopg2 --no-cache Source: https://stackoverflow.com/questions/26288042/error-installing-psycopg2-library-not-found-for-lssl/39244687#39244687
The reason is that probably it might work faster in my machine if it was installed using the not binary version</description></item><item><title>Celery and Celery Beat</title><link>https://jinyuz.dev/posts/celery-and-celery-beat/</link><pubDate>Wed, 13 Jul 2022 09:26:02 +0800</pubDate><guid>https://jinyuz.dev/posts/celery-and-celery-beat/</guid><description>TL;DR #Run both with one command in development. Not recommended for production
DJANGO_SETTINGS_MODULE=project.settings celery -A arkis worker -l info --beat</description></item><item><title>Resolving rebase merge conflict with Vim/Neovim</title><link>https://jinyuz.dev/posts/vim-rebase-merge-conflict/</link><pubDate>Sat, 25 Jun 2022 11:06:42 +0800</pubDate><guid>https://jinyuz.dev/posts/vim-rebase-merge-conflict/</guid><description>TL;DR #left column is my changes middle is current right is the upstream changes
Use dg2 to apply changes from the left Use dg3 to apply changes from the right</description></item><item><title>Vim Delete Pattern</title><link>https://jinyuz.dev/posts/vim-delete-pattern/</link><pubDate>Sat, 25 Jun 2022 11:06:42 +0800</pubDate><guid>https://jinyuz.dev/posts/vim-delete-pattern/</guid><description>TL;DR
:g/&amp;lt;pattern&amp;gt;/d :g!/&amp;lt;pattern&amp;gt;/d :g/&amp;#34;cx_i.*/d</description></item><item><title>Vim Surround Words With Quote</title><link>https://jinyuz.dev/posts/vim-surround-words-with-quote/</link><pubDate>Sat, 25 Jun 2022 11:06:42 +0800</pubDate><guid>https://jinyuz.dev/posts/vim-surround-words-with-quote/</guid><description>TL;DR
:s/\v(\S+)/&amp;#34;\1&amp;#34;/ You can also use ysw(
Source:
https://stackoverflow.com/a/2149862</description></item><item><title>async Python</title><link>https://jinyuz.dev/posts/async-python/</link><pubDate>Sun, 12 Jun 2022 22:08:04 +0800</pubDate><guid>https://jinyuz.dev/posts/async-python/</guid><description>TL;DR #When your python code encounters an await keyword, it just means that it&amp;rsquo;s going to send the control back to the event loop to let other functions execute.
await lets the CPU know that a coroutine is waiting for an operation that isn&amp;rsquo;t CPU bound e.g. network requests, database writes, etc.
coroutines always executes sequentially and the event loop is what manages the execution order of coroutines (via asyncio.gather, asyncio.</description></item><item><title>Python Profiling</title><link>https://jinyuz.dev/posts/python-profiling/</link><pubDate>Sun, 12 Jun 2022 11:40:48 +0800</pubDate><guid>https://jinyuz.dev/posts/python-profiling/</guid><description>TL;DR
snakeviz cProfile
Source: https://piped.kavin.rocks/watch?v=m_a0fN48Alw</description></item><item><title>Understading Asdf Direnv</title><link>https://jinyuz.dev/posts/understading-asdf-direnv/</link><pubDate>Sun, 05 Jun 2022 20:29:52 +0800</pubDate><guid>https://jinyuz.dev/posts/understading-asdf-direnv/</guid><description>TL;DR #Because I&amp;rsquo;m using tmux, shell gets ran every time.
config.fish is loaded first
asdf-direnv loads the .envrc
.envrc contains use asdf and then executes it
$PATH is updated because of use asdf
The problem is that if I activate a python virtualenv, it gets added to the $PATH
# virtualfish auto_activation enabled virtualenv/path/to/python asdf/direnv/loaded/bins/golang asdf/direnv/loaded/bins/python If I open a split pane via tmux, the $PATH will look like
# virtualfish auto_activation enabled asdf/direnv/loaded/bins/golang asdf/direnv/loaded/bins/python virtualenv/path/to/python virtualenv path gets placed at the bottom</description></item><item><title>Using Poetry</title><link>https://jinyuz.dev/posts/using-poetry/</link><pubDate>Tue, 31 May 2022 19:01:32 +0800</pubDate><guid>https://jinyuz.dev/posts/using-poetry/</guid><description>I thought poetry would disrupt my workflow because it will automatically create its own virtualenv and I wouldn&amp;rsquo;t be able to leverage virtualfish auto_activate feature.
It turns out that if the virtualenv is already activated, poetry will not attempt to create a new virtualenv and will instead install it to the currently activated virtualenv</description></item><item><title>Using git core.sshCommand</title><link>https://jinyuz.dev/posts/use-git-core.sshcommand/</link><pubDate>Sun, 29 May 2022 20:30:45 +0800</pubDate><guid>https://jinyuz.dev/posts/use-git-core.sshcommand/</guid><description>I think it&amp;rsquo;s overall better than my previous post for managing multiple git users since we are just creating a new .gitconfig file
It turns out, I need to add ssh -i identity_file_ed5 -F /dev/null so it won&amp;rsquo;t load the default ~/.ssh/config file</description></item><item><title>Sticking With Vim Philosophy Keybinds</title><link>https://jinyuz.dev/posts/sticking-with-vim-philosophy-keybinds/</link><pubDate>Tue, 19 Apr 2022 09:46:56 +0800</pubDate><guid>https://jinyuz.dev/posts/sticking-with-vim-philosophy-keybinds/</guid><description>Introduction #When was the last time you took quite some time when choosing your vim keybindings? Be it for a plugin or your own custom functions
I&amp;rsquo;m gonna talk about the choices I made and what made my keybindings the way it is.
Getting Started with Vim #When I started out completely moving to (neo)vim from VSCode, I started out copying a bunch of configs, especially from leeren.
His talk about Going mouseless with Vim and Tmux gave me inspiration to completely switch to vim and with just using less plugins.</description></item><item><title>Migrating to Hugo</title><link>https://jinyuz.dev/posts/migrating-to-hugo/</link><pubDate>Fri, 15 Apr 2022 21:11:26 +0800</pubDate><guid>https://jinyuz.dev/posts/migrating-to-hugo/</guid><description>It&amp;rsquo;s been a while since I last posted and one of the reasons was that I was using GatsbyJS and modified the gatsby-starter-lumen files and it caused me a lot of problems where it came to a point that my site was not building anymore. I&amp;rsquo;m probably just inexperienced and might&amp;rsquo;ve done something wrong with the template
I like how hugo has this concept of overriding templates by just adding the same .</description></item><item><title>Make Your Django Project Newbie Contributor Friendly With pre-commit</title><link>https://jinyuz.dev/posts/make-your-django-project-newbie-contributor-friendly-with-pre-commit/</link><pubDate>Sun, 04 Jul 2021 22:53:17 +0000</pubDate><guid>https://jinyuz.dev/posts/make-your-django-project-newbie-contributor-friendly-with-pre-commit/</guid><description>It&amp;rsquo;s really worth investing time configuring your project and make it easy for other developers to contribute.
One way of enabling this is a clean, organized, and well-formatted code.
This is really helpful especially for first time developers or contributors as it makes pull request reviews less painful (e.g. trailing white space, unorganized imports, debug statements)
We can easily prevent this by using a tool called pre-commit. Let&amp;rsquo;s get started!</description></item><item><title>Changing Caps Lock Key to Escape When Pressed Alone and Control When Pressed With Another</title><link>https://jinyuz.dev/posts/changing-caps-lock-key-to-escape-when-pressed-alone-and-control-when-pressed-with-another/</link><pubDate>Sat, 02 Jan 2021 18:43:28 +0000</pubDate><guid>https://jinyuz.dev/posts/changing-caps-lock-key-to-escape-when-pressed-alone-and-control-when-pressed-with-another/</guid><description>Like you before, I pretty much didn&amp;rsquo;t give a damn about remmaping my mapping keyboard because I was worried about what if I&amp;rsquo;m using someone elses keyboard? I&amp;rsquo;d be too dependent about my current setup.
But let me ask you. When was the last time you used someone elses keyboard?
After some time living inside the terminal, I noticed that it&amp;rsquo;s quite hard to press the control key especially when you are using a Mac keyboard layout.</description></item><item><title>Faking Google Cloud Storage in Python</title><link>https://jinyuz.dev/posts/faking-google-cloud-storage-in-python/</link><pubDate>Sun, 27 Dec 2020 20:49:11 +0000</pubDate><guid>https://jinyuz.dev/posts/faking-google-cloud-storage-in-python/</guid><description>I had a problem where I couldn&amp;rsquo;t register to google cloud and use the google cloud storage service. Tried searching online and found this repository: https://github.com/fsouza/fake-gcs-server
It has great documentation and you can also run it if you have docker installed:
$ docker run -d --name fake-gcs-server -p 4443:4443 fsouza/fake-gcs-server I had a task to upload files to google cloud storage but I wasn&amp;rsquo;t given access to the bucket. We were using docker and I was able to easily add it to our docker-compose.</description></item><item><title>Using Case..When in Django</title><link>https://jinyuz.dev/posts/using-case-when-in-django/</link><pubDate>Sun, 20 Dec 2020 21:01:25 +0000</pubDate><guid>https://jinyuz.dev/posts/using-case-when-in-django/</guid><description>I was working on a multi-tenant project and encountered a bug when using Django&amp;rsquo;s GenericForeignKey with django-tenants. It was using the public schema&amp;rsquo;s contenttype_id instead of the tenant schema&amp;rsquo;s contenttype_id.
So, if I have a model of Comment, my django_content_type table would have something like
public.django_content_type
id app_label model 15 comments comment tenant.django_content_type
id app_label model 19 comments comment There shouldn&amp;rsquo;t be a problem here since django-tenants should handle this because it chooses the id of the tenant first and then only use the public as a fall back value.</description></item><item><title>Using pg_dump and pg_restore to Backup and Restore PostgreSQL Database</title><link>https://jinyuz.dev/posts/using-pg_dump-and-pg_restore-to-backup-and-restore-postgresql-database/</link><pubDate>Sun, 13 Dec 2020 21:47:26 +0000</pubDate><guid>https://jinyuz.dev/posts/using-pg_dump-and-pg_restore-to-backup-and-restore-postgresql-database/</guid><description>So, I was trying to reproduce some issues and bugs that only happened in production. I needed an exact copy of the production database and run it locally.
Here&amp;rsquo;s how I did it using pg_dump and pg_restore.
$ pg_dump -U postgres -Fc -Z 9 -j 8 production.dump -d postgres Here&amp;rsquo;s the breakdown for the arguments:
U means username. It&amp;rsquo;s used to connect to your postgres database. In this case, my username is postgres.</description></item><item><title>How to Checkout to a Github Pull Request</title><link>https://jinyuz.dev/posts/how-to-checkout-to-a-github-pull-request/</link><pubDate>Sun, 29 Nov 2020 20:58:44 +0000</pubDate><guid>https://jinyuz.dev/posts/how-to-checkout-to-a-github-pull-request/</guid><description>There was a pull request on GitHub and it contains a feature I wanted to test. I didn&amp;rsquo;t know how to test it locally. Should I just copy the changes to my local since the changes weren&amp;rsquo;t that big? But what if it was?
Luckily, I found some answers by googling and decided to write it up for future reference.
Git provides a command for it and here is the sample syntax</description></item><item><title>Using Find and Executing a Command</title><link>https://jinyuz.dev/posts/using-find-and-executing-a-command/</link><pubDate>Mon, 16 Nov 2020 21:43:29 +0000</pubDate><guid>https://jinyuz.dev/posts/using-find-and-executing-a-command/</guid><description>I mostly work on django projects and as a dev who likes shortcuts, I wanted to have an alias of pm for python manage.py.
I could&amp;rsquo;ve just added
alias pm=&amp;#34;python manage.py&amp;#34; inside of my config but I was working on different projects where manage.py was located in different folders. Typical projects have it located under root while some projects have it under src/manage.py.
What I needed was a way to find where the manage.</description></item><item><title>Switching from pyenv, rbenv, goenv and nvm to asdf</title><link>https://jinyuz.dev/posts/switching-from-env-to-asdf/</link><pubDate>Sun, 19 Jul 2020 19:57:19 +0000</pubDate><guid>https://jinyuz.dev/posts/switching-from-env-to-asdf/</guid><description>So, there was a time when I was only developing applications using Python. And so I found out about virtual environments. And then after a couple of months, I discovered pyenv.
It also came to a time I had to work on multiple projects that uses different versions of nodejs and searched something similar so I installed nvm.
Then, I was required to work on a Ruby project so I installed rbenv.</description></item><item><title>Django: Display raw SQL of a queryset</title><link>https://jinyuz.dev/posts/django-display-raw-sql-of-a-queryset/</link><pubDate>Mon, 18 May 2020 17:16:17 +0000</pubDate><guid>https://jinyuz.dev/posts/django-display-raw-sql-of-a-queryset/</guid><description>Often, I forget how to display the raw SQL of a queryset in Django. This is a quick and easy example of how to do it
from django.contrib.auth.models import User qs = User.objects.all() print(qs.query) SELECT &amp;#34;auth_user&amp;#34;.&amp;#34;id&amp;#34;, &amp;#34;auth_user&amp;#34;.&amp;#34;password&amp;#34;, &amp;#34;auth_user&amp;#34;.&amp;#34;last_login&amp;#34;, &amp;#34;auth_user&amp;#34;.&amp;#34;is_superuser&amp;#34;, &amp;#34;auth_user&amp;#34;.&amp;#34;username&amp;#34;, &amp;#34;auth_user&amp;#34;.&amp;#34;first_name&amp;#34;, &amp;#34;auth_user&amp;#34;.&amp;#34;last_name&amp;#34;, &amp;#34;auth_user&amp;#34;.&amp;#34;email&amp;#34;, &amp;#34;auth_user&amp;#34;.&amp;#34;is_staff&amp;#34;, &amp;#34;auth_user&amp;#34;.&amp;#34;is_active&amp;#34;, &amp;#34;auth_user&amp;#34;.&amp;#34;date_joined&amp;#34; FROM &amp;#34;auth_user&amp;#34;</description></item><item><title>Managing Multiple Git Configurations</title><link>https://jinyuz.dev/posts/managing-multiple-git-configurations/</link><pubDate>Sat, 16 May 2020 21:30:40 +0000</pubDate><guid>https://jinyuz.dev/posts/managing-multiple-git-configurations/</guid><description>Suppose that you have a full time job at Amazon, and you want to separate your git commit emails from Amazon and your personal projects.
Setting up ~/.gitconfig
$ touch ~/.gitconfig For our personal projects, we will use the ~/.gitconfig file with the following content:
[user] name = James Banned email = james.banned@gmail.com [includeIf &amp;#34;gitdir:~/Work/&amp;#34;] path = ~/.gitconfig.work The includeIf basically means that include this config if I&amp;rsquo;m inside the ~/Work/ directory.</description></item><item><title>/ about</title><link>https://jinyuz.dev/about/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://jinyuz.dev/about/</guid><description>I love to write clean and readable code. When developing software, I go by the quote:
Make it work, make it right, make it fast.
&amp;ndash; Kent Beck
I&amp;rsquo;m currently developing web applications with Python and Django. I am mostly working on the backend so I heavily use Django REST Framework, though I&amp;rsquo;ve also used FastAPI and Flask.
I haven&amp;rsquo;t been a fan of modern frontend but I do know how to work with them.</description></item><item><title>/ talks</title><link>https://jinyuz.dev/talks/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://jinyuz.dev/talks/</guid><description>2024 # Python Metaprogramming: From Muggle to Wizard 🧙</description></item><item><title>/ uses</title><link>https://jinyuz.dev/uses/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://jinyuz.dev/uses/</guid><description>If you&amp;rsquo;ve ever wondered what I&amp;rsquo;m using be it software, hardware, fonts, etc. then this page is dedicated for that 😉 Based on uses.tech
Hardware # MacBook Pro M1 (16-inch, 2021). Previously MacBook Pro (13-inch, 2017) Logitech M585. Previously Logitech M337. I don&amp;rsquo;t need a fancy mouse as I have a keyboard centric workflow iPhone 11 &amp;amp; Samsung Galaxy S20+ Software (Desktop Apps and CLI tools) # (neo)vim &amp;ndash; Currently my main $EDITOR.</description></item></channel></rss>