Skip to content

Instantly share code, notes, and snippets.

View GeorgeCiesinski's full-sized avatar
🎯
Focusing

George Ciesinski GeorgeCiesinski

🎯
Focusing
  • Toronto
View GitHub Profile
@GeorgeCiesinski
GeorgeCiesinski / postgresql_plus_arch-linux.md
Created May 20, 2023 22:53 — forked from NickMcSweeney/postgresql_plus_arch-linux.md
Getting postgresql running on Arch Linux

Setup Postgresql

run postgresql with systemctl

Install postgres

latest

sudo pacman -S postgresql

specific version

find version & build from source

@GeorgeCiesinski
GeorgeCiesinski / gh-pages-deploy.md
Created February 12, 2023 02:43 — forked from cobyism/gh-pages-deploy.md
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@GeorgeCiesinski
GeorgeCiesinski / contrast.js
Last active January 11, 2023 19:56
Find contrast ratio between two hex values
// Measure the relative luminance of each RGB value
const reLum = function relativeLuminance(RGB) {
let newRGB = RGB;
newRGB /= 255;
return newRGB <= 0.03928 ?
newRGB / 12.92 :
((newRGB + 0.055) / 1.055) ** 2.4;
}
// Measure the luminance of the color
@GeorgeCiesinski
GeorgeCiesinski / Count Code lines
Created September 29, 2021 20:29 — forked from amitchhajer/Count Code lines
Count number of code lines in git repository per user
git ls-files -z | xargs -0n1 git blame -w | perl -n -e '/^.*\((.*?)\s*[\d]{4}/; print $1,"\n"' | sort -f | uniq -c | sort -n