I can’t remember the last time I touched a git UI client. It just seems odd, once you get familiar with the git CLI.
git command --help
Works for arbitrary sub-commands too:
git command subcommand --help
Initializes a git repo in the working directory:
Notice: All git stuff is stored in the
.gitfolder. Simply delete
.gitif you want to start over. Just be aware everything git related will be gone —it will be as if git never was there.
git remote add origin repo_url
My usual routine when I start a new project:
The key pair will be used for authentication. You will get 2 files, one is the private key, and the other the public key. The private key is what stays on your host machine. The public key is what you distribute to other systems.
The system can now verify that you are authorized; when you send some data signed (encrypted) with your private key, the system can decrypt it with the deposited public key. The keys are complementary to each other. One can undo the operation of the other. That allows you to prove your identity without sharing the tool…
As developers, we spend a large portion of our time writing code. As a consequence, we seek to grow the crafts of coding by looking for guides and habits that help us produce more clean and maintainable code. But is code really the sole source of value in a software project? I doubt it.
Code may get the job done, but it is only the outcome of a long thinking process. If one had to track down the true value in a software project, I’d argue that it lays in the thinking processes and the final ideas arising from them…
Even though not always obvious at a first glance, GitHub offers many useful tools besides hosting a git repository. Today’s topic:
I’ll show you how to publish a Maven package to your GitHub repo using Gradle — Something that is also covered by the GitHub documentation. I will complement it with some hints that were not completely obvious to me when I was first publishing.
If you’re the no-talk-just-example kind of type; here’s the gist.
Authentication is done with a token, so let’s begin with creating one.
In GitHub, navigate to Settings → Developer settings → Personal access tokens and…
Take a prime number
p and another integer
x != p, using those two numbers you are able to reach all integers out there in ℤ. All you need is a linear combination of
p as a prime number does not share any divisor with
x, except for the number 1. Hence the greatest common divisor
gcd(p,x) is equal to 1.
Using extended euclidean algorithm, we can trace down the way to
gcd(p,x) while retaining each intermediate result as a linear combination of
Today I had a pleasurable experience with Docker multi-stage builds and the
COPY --from build command. Docker multi-stage builds allow you to reduce the final image size and complexity by using multiple
FROM statements in a single Dockerfile.
FROM statement introduces a new build stage, which can also be given a name using
FROM as name. The layers of all stages except for the last one will be erased after
docker build (i.e. the last
FROM starts the actual image that is being built.) During the build, artifacts can be copied from one stage to another using
Lately I managed to setup a GitLab CI/CD deployment pipeline for a React Native app. In this article I would like to share my insights and learnings, along with a proposition for a working
.gitlab-ci.yml configuration whose operability has been proven in my latest studies project.
The goal is to deploy a React Native App to your own server in a GitLab CI/CD pipeline. As a result, new code gets immediately deployed as pushed to GitLab. Users will be able to start the app on iOS or Android by scanning a QR-Code or opening a hyperlink, given they have installed…
n, find its prime factorisation
Each natural number is composed of a unique product of indivisible numbers also called prime numbers. Prime numbers are the building blocks of natural numbers and the prime factorisation of a number is its unique fingerprint. The prime factorisation of 17'160 is:
17160 = 2*2*2*3*5*11*13
It is easy to validate a given finger print by multiplying the numbers together. It is rather hard to calculate the finger print of a given number. There is no simple operation like multiplication to receive the sequence of numbers in the prime factorisation. Still we know it must exist and the smallest possible number…
O(log x) Multiplikationen berechnen.
a in jeder Iteration mit sich selber multiplizieren. So entsteht die Folge:
a^x kann nun berechnet werden, indem bestimmte Zahlen aus dieser Folge miteinander multipliziert werden. Es gilt nämlich:
a^(x+y) = a^x * a^y
Jede Dezimalzahl lässt sich als Summe von 2er Potenzen darstellen (Binärdarstellung). Beispiel:
27 = 2^0 + 2^1 + 2^3 + 2^4 = 1 + 2 + 8 + 16
a^27 könnte man dementsprechend wie folgt schreiben:
a^(1+2+8+16) = a^1 * a^2 * a^8 * a^16
Das sind alles Glieder aus der obig beschriebenen Folge…
Writing code is like art, so is the process of collaboration. You can always seek to improve and become a better collaborator. This article is about what I have learned during my time as a code collaborator. Not everything may hold true for you. It may not even hold true for myself, because I try to constantly evolve my own experiences. Rather it represents a snapshot of my experience and you can take out whatever’s useful to you and throw away the rest.
When writing code, we spend a lot of time thinking. I often get lost in my head…
Hi! 👋 I’m Mike — did you know the oldest computer was owned by Adam and Eve? It was an apple with very limited memory. Just one byte and everything crashed.