Skip to content

Instantly share code, notes, and snippets.

View martwozniak's full-sized avatar
🟢
ONLINE

Marcin Wozniak martwozniak

🟢
ONLINE
View GitHub Profile
@martwozniak
martwozniak / ubuntu_boot_fix.txt
Created November 9, 2023 21:27 — forked from gpetuhov/ubuntu_boot_fix.txt
Fix boot after Ubuntu install
To fix boot menu after installing Ubuntu (for example when installing along with Windows):
https://help.ubuntu.com/community/Boot-Repair
install Boot Repair:
sudo apt-add-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair
Choose 'Recommended Repair'
@martwozniak
martwozniak / phx_sqlite_fly_launch.md
Created October 29, 2023 17:21 — forked from mcrumm/phx_sqlite_fly_launch.md
Phoenix + SQLite Deployment tips

Deploying to Fly.io with SQLite

Deploying a Phoenix app to Fly.io is a breeze...is what everyone kept telling me. In fairness, I imagine the process would have been breezier had I just used postgres, but all the sqlite and litestream talk has been far too intriguing to ignore. "Wait", you say. "It is just a flat file. How much harder can it be?"

It is easy to make something harder than it should be. It is hard to take something complex and make it truly simple. flyctl launch does an amazing job at providing a simple interface to the utterly complex task of generating deployment resources, especially now that we are living in a containerd (erm, firecracker) world.

This gist is for anyone who, like me, thinks they know better than to read all of the documentation and therefore necessari

@martwozniak
martwozniak / cloudflare-pages-bun.env
Created September 12, 2023 05:53 — forked from Hebilicious/cloudflare-pages-bun.env
Cloudflare Pages and Bun
# You can use these environments variables to enable bun in your CFP builds
SKIP_DEPENDENCY_INSTALL=true
UNSTABLE_PRE_BUILD=asdf plugin add bun && asdf install bun latest && asdf global bun latest && bun i
@martwozniak
martwozniak / law.json
Last active August 21, 2023 22:58
law
{"text": "# TWÓJ BRANCH TWOJ PROBLEM."}
@martwozniak
martwozniak / Readme.md
Created June 19, 2023 10:20 — forked from cutiko/Readme.md
Git delete last commit

Removing the last commit

To remove the last commit from git, you can simply run git reset --hard HEAD^ If you are removing multiple commits from the top, you can run git reset --hard HEAD~2 to remove the last two commits. You can increase the number to remove even more commits.

If you want to "uncommit" the commits, but keep the changes around for reworking, remove the "--hard": git reset HEAD^ which will evict the commits from the branch and from the index, but leave the working tree around.

If you want to save the commits on a new branch name, then run git branch newbranchname before doing the git reset.

ORIGINAL did fork but search didn't helped me

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

Future:

  • SaaS (Enterprise SaaS)
  • Blockchain
  • AI
  • Industry 4.0
  • Green Energy
  • Nano-tech
  • Robotics
  • IoT
  • Bio-tech
@martwozniak
martwozniak / deploy.sh
Created January 4, 2023 14:49 — forked from stancl/deploy.sh
Deploy using GitHub actions and SSH to a VPS
#!/bin/sh
set -e
vendor/bin/phpunit
npm run prod
git add .
(git commit -m "Build frontend assets for deployment to production") || true
(git push) || true
@martwozniak
martwozniak / git.md
Created July 2, 2022 16:35
commit types
feat – nowa funkcjonalność
fix – poprawka do istniejącej funkcjonalności
docs – zmiany tylko w dokumentacji
chore – zmiany które nie mają wpływu z zawartość kodu źródłowego czy testów (np. aktualizacja paczek)
refactor – zmiany, które nie są zarówno poprawkami jak i nowymi funkcjonalnościami
tests – wszystko co związane z testami (dodawanie, edycja)
perf – zmiany w kodzie usprawniające wydajność,
styles – wszelkiego rodzaju formatorania kodu, białe znaki, przecinki czy brakujące średniki

ci – zmiany na potrzeby CI (konfigi, skrypty),

@martwozniak
martwozniak / domain.com
Created May 1, 2022 18:57
nginx reverse proxy without ssl
server {
server_name <DOMAIN_NAME> www.<DOMAIN_NAME>;
client_max_body_size 100M;
autoindex off;
location / {
# reverse proxy for next server
proxy_pass http://localhost:<PORT>;
proxy_http_version 1.1;