My TILs

Things I've learned, collected in stefanzweig/scratch.

Atom feed

Browse by topic: ahk 1 · cmake 1 · datasette 4 · developmemt 1 · django 3 · emacs 3 · git 1 · gitlab 1 · linux 1 · minikube 1 · podcast 1 · powershell 1 · python 2 · reading 1 · sqlite 3 · vim 1 · windows 1 · xmake 1

Recent TILs

xmake Tasks in xmake - 2025-03-26

My xmake's version is xmake v2.9.8+20250321, which runs in the ubuntu 20.04. …

datasette how to make field with " into numeric one - 2025-01-06

In a CSV file, if a column contains numbers with commas (e.g., "1,000"), and the quote marks, I am using emacs to covert it into a recognizable numeric format. …

python fix datasette-publish-vercel in github actions - 2024-12-24

To find the location of the package datasette-publish-vercel and replace it with datasette_publish_vercel in the vercel_cli.py file, you can firstly define the function as the following code: …

powershell How to remove the folder recursively - 2024-12-13

To remove the folder, use the following statements: …

windows Launch Apps in Startup - 2024-01-23

Click Win+r and run the following command. …

emacs Indentation for Python in Babel Block - 2024-01-23

I am using org mode for note taking. Sometimes I write python code in babel block. …

datasette SQLite-Utils Insert Files into database - 2024-01-21

I want to insert all the csv files in the folder into the tabel mytable. …

linux Show the workspaces in external monitor only - 2023-08-28

I am using xubuntu in my old MacBook Air with an external monitor. the window manager is i3wm. The first workspace lies in internal display which make me hard to check where my mouse is. So I have to configure all the workspaces are shown in the external monitor. the tool of the multiple monitor control is xrandr. …

cmake How to make cmake make things with gcc - 2023-08-24

Nowadays I am working on a project running both on linux and on windows. I have to compile some libs with cmake. On ubuntu the compiler by default is the gcc, while in windows the toolchain is quite complicated that msvc is used by default. I need compile the lib with mingw64 toolchain. I have to configure the cmake's Makefile to use gcc. …

ahk How to center the active window with AHK - 2023-07-27

The script is as below. …

sqlite DateTime in SQLite - 2023-06-30

Function date can add some offsets in query statement. …

datasette Learn to Use Datasette Dashboard - 2023-06-30

In metadata.yml, …

sqlite How to clean the database - 2023-06-18

SQLite-utils can clean the data in the database.db. …

sqlite How to handle the big data with sqlite and pandas - 2023-03-21

SQLite with memory can be used to handled the big data in csv format. …

minikube How to install minikube? - 2023-01-21

TBD. …

gitlab How to configure the gitlab-runner in both user and root mode - 2023-01-20

We install the gitlab-runner on ubuntu server. …

emacs How to set the size of frame - 2022-11-03

To set the size of the frame, using the following statements: …

python Attrs and Dataclass - 2022-10-26

Two packages to define classes and attributes. …

datasette Use SQLite-Utils Analyzing the Data in Table - 2022-10-26

Curl the link and get the data, passing it to the sqlite-utils with memory - option to analyse data, following a sql statement. …

django Bulk Create - 2022-10-21

Bulk create the data at a time. …

emacs How to get a link in a long line - 2022-10-16

I saw a table in a page in which a link is in a column of each row. I need to snap all the links. What I did is as the following. …

django Django-Apscheduler schedule a job - 2022-10-14

I need to run the job at several time points in the day. The solution is comma-split string in the register_job decorator. …

django How do I convert django queryset into list of dictionary - 2022-10-13

link: https://stackoverflow.com/questions/7811556/

reading How I Side Project - 2022-10-07

Link: https://thesephist.com/posts/how-i-side-project/

podcast Talk Python To Me - 2022-10-07

Link: https://talkpython.fm/home

developmemt How to sync the migration files in development with django? - 2022-09-17

There are several developers in my team. Our project is being developed with django framework. All the backend guys have their local development database and they manage their own database migration files. They do not commit the migration files to version control. This is quite good but some guy has the bad habbit not fix the migration problem of default value. Others have to fix the problem when they pull the model changes back. …

git How to find out files that are deleted - 2022-09-14

I met a problem this morning. Some guy in my team deleted some database migration files by accident a few days ago. And I can't remember the files's contents. …

vim Mouse support in vim - 2022-08-29

Today I learned that if you hit Esc in vim and then type :set mouse=a and hit enter... vim grows mouse support! In your terminal! …

Browse all 28 TILs