Skip to content

Instantly share code, notes, and snippets.

View AndreiHondrari's full-sized avatar
🌊
surfin' them life waves

Andrei-George Hondrari AndreiHondrari

🌊
surfin' them life waves
View GitHub Profile
@AndreiHondrari
AndreiHondrari / useful_commands.txt
Last active June 17, 2021 14:44
Useful terminal commands
# Docker
# dummy docker containers
docker create --name ubuntu_can ubuntu /bin/bash -c "sleep infinity"
docker create --name alpine_box alpine /bin/sh -c "sleep infinity"
# Image conversion
find . -name "*.jpg" -print0 | xargs -0 -I xx convert xx -resize 1920 -quality 85 xx
find . -type f -name "*.png" | xargs -I xx basename -s .png xx | xargs -I xx convert xx.png -resize 960 -quality 90 output/xx.jpg

Important HTML Meta tags for basic SEO

HTML tag attributes

<html lang="<< here goes language code >>" prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# product: http://ogp.me/ns/product# article: http://ogp.me/ns/article#">

Generic meta tags

<meta charset="UTF-8"/>

In 2018 a lot of browsers support the Flexbox and Grid which are very powerful CSS display modes that overshine classical methods such as Faux Columns or Tabular Displays (which are treated later in this answer).

In order to implement this with the Grid, it is enough to specify display: grid and grid-template-columns on the container. The grid-template-columns depends on the number of columns you have, in this example I will use 3 columns, hence the property will look: grid-template-columns: auto auto auto, which basically means that each of the columns will have auto width.

Full working example with Grid:

@AndreiHondrari
AndreiHondrari / preprocessor_fun.h
Created June 15, 2016 13:03 — forked from aras-p/preprocessor_fun.h
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,