footer + blog post

This commit is contained in:
Artur Akmalov
2023-04-26 18:06:26 +05:00
parent 3d14d8de70
commit bbf241c62e
8 changed files with 75 additions and 18 deletions

BIN
blog/21/feature.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

View File

@@ -0,0 +1,34 @@
---
title: How I Leveled Up My Git Skills
type: post
date: 2023-01-21
dateModified:
tags: [git, cli, terminal]
featuredImage:
path: feature.jpg
---
When I first started programming in git I didn't use the terminal. I had never learned how to. I had no clue where to begin, so I didn't. I searched for a gui git client and grabbed one that looked good. I also relied on source control features built into my ide. Years later that I realized how learning the cli for git how much it would improve my speed and efficiency. So here's my journey from relying on the gui to becoming comfortable in the terminal.
## Change Causes Evolution
When I first started out I wouldn't have changed my process. Until I got a new computer. Either because of old hardware or a new job. The new computer would not be set up like the old one. And thus started a long journey of remembering which apps I had installed and what settings I had for them. This was a huge pain. Which led me to stop doing it. After a few of these new set ups I stopped carrying over every app I had ever used. My git gui was one of those that didn't make. Which meant I needed a new way of running git commands.
## Learning as Needed
I started by reading the docs for git and looking up git cheat sheets. I found out that there was a lot of info out there. Too much in fact. For me, memorizing every git command wasn't going to work. Instead, I would search the internet for git commands that I needed when I ran into a need for them. It's still the way I learn how to git. I prefer it because I don't learn things that I won't need. And I learned how to git using the cli.
## Sanic Speed
The next big improvement I made was to pay attention to the aliasing the git cli brought with it. I set up my terminal so that it recognizes commands as I type them. One day I noticed that `g` was a valid command. So I ran it. Turns out `g` is an alias for `git`. So now all my `git` commands became `g` commands. And I thought this was amazing. But it gets even better! Now whenever I needed to run a git command I tried to find aliases for it. Through trial and error I figured out even the subcommands have aliases. So `git add` is the same as `ga`. But it still gets better! Turns out there are also aliases for subcommands and their flags! A common command I run is `git commit --all --message "commit message"`. And through my journey I have found these shortcuts for this same exact command:
- `g commit --all --message "commit message"`
- `g commit -a -m "commit message"`
- `gc -am "commit message"`
- `gcam "commit message"`
These aliases exist for all of the subcommands I use on a daily basis: add, checkout, branch, remote, clone, push, pull, merge, status... I'm sure there are even more. I recommend using the `-h` flag on any command you use.
## Try It!
Finding these aliases has increased my speed and efficiency while programming with git. I was using the gui as a crutch to avoid the terminal and cli. I hope these aliases can help you out too.

View File

@@ -3,12 +3,9 @@ title: React Native Environment Setup
type: post
date: 2023-04-24
dateModified:
tags: [react native, setup, env, config]
tags: [react, setup, env, config]
featuredImage:
path: feature.jpg
creator:
name: Matthew Smith
url: https://unsplash.com/@whale
---
I enjoy building apps in react native. Yet, configuring my system to run them is a pain. In this article I'll outline how I've tried to make it less painful.

View File

@@ -7,7 +7,7 @@ module.exports = {
siteUrl: `https://dev.akmalov.com`,
description: 'The personal blog Artur Akmalov',
image: './images/icon.png',
keywords: ['React', 'React Native', 'Node'],
keywords: ['Blog', 'DevOps', 'Python', 'Linux', 'Network', 'Homelab'],
githubUrl: 'https://github.com/akmalovaa',
linkedInUrl: 'https://linkedin.com/in/akmalovaa',
},

View File

@@ -1,21 +1,20 @@
import React from 'react'
// import Ichthys from '../svg/ichthys.svg'
import { useSiteMetadata } from '../hooks/use-site-metadata'
export const Footer = () => {
const year = new Date().getFullYear()
// const { biolinkUrl } = useSiteMetadata()
const { githubUrl } = useSiteMetadata()
return (
<footer className="mt-4 flex items-center justify-center gap-2 bg-surface py-6 shadow-inner">
<div>© {year}</div>
{/* <a href={biolinkUrl} className="!no-underline">
Stephen Cavender
</a> */}
<h2 className="text-2xl font-bold">
Footer
</h2>
<a href={githubUrl} className="!no-underline">
Artur Akmalov
</a>
{/* <Ichthys alt="ichthys" className="w-8" /> */}
</footer>
)
}
export default Footer
export default Footer

View File

@@ -0,0 +1,22 @@
import { useStaticQuery, graphql } from 'gatsby'
export const useSiteMetadata = () => {
const { site } = useStaticQuery(
graphql`
query SiteMetaData {
site {
siteMetadata {
title
siteUrl
description
image
keywords
githubUrl
linkedInUrl
}
}
}
`
)
return site.siteMetadata
}

View File

@@ -1,14 +1,19 @@
import * as React from "react"
import Header from "../components/header"
import Footer from "../components/footer"
const AboutPage = () => {
return (
<main>
<Header></Header>
<h1 className="text-3xl font-bold">
About page
</h1>
<Header />
<div className="mx-auto max-w-screen-xl">
<div className="ml-7 mt-6 justify-between">
<h1>About page</h1>
<p>Info about me</p>
</div>
</div>
<Footer />
</main>
)
}

View File

@@ -1,7 +1,7 @@
import * as React from "react"
// import { Link } from 'gatsby'
import Footer from "../components/footer"
import Header from "../components/header"
import Footer from "../components/footer"
const IndexPage = () => {
return (