Skip to content

Instantly share code, notes, and snippets.

View placek's full-sized avatar

Paweł Placzyński placek

  • BinarApps
  • Łódź Poland
View GitHub Profile
@placek
placek / README.md
Last active July 26, 2023 19:35
TODO file as a support while working on feature branch

Work with TODO file

This gist presents a methodology of working on a task on feature branch using a TODO file as a support.

How?

Here is a possible scenario:

  1. Turn on verbose commits option: git config --local commit.verbose true. It's really awesome!
  2. Take a task from your project management tool.
  3. cd to repo.
  4. Checkout to a main branch on the repo: git checkout master.
  5. Pull the most recent changes from origin: git pull origin master.
@placek
placek / .vimrc
Last active July 25, 2023 13:40
Some simple vimrc that makes VIM into an IDE (kind of).
""""""""""""""""""""""""""""""""" ESSENTIALS """""""""""""""""""""""""""""""""""
filetype plugin indent on " for plugins to load correctly
syntax enable " turn on syntax highlighting
set nocompatible " don't try to be vi compatible
"""""""""""""""""""""""""""""""""" SETTINGS """"""""""""""""""""""""""""""""""""
" interface
set cmdheight=1 " set command line height
set cursorline " line at current cursor position
set foldcolumn=1 " always show at least one cahr in fold column
@placek
placek / ctags
Created October 26, 2022 14:00
git hooks ctags
#!/usr/bin/env bash
set -eux
root="$(git rev-parse --show-toplevel)"
dir="$root/$(git rev-parse --git-dir)"
trap 'rm -f "$dir/$$.tags"' EXIT
hasktags -cxRf "$dir/$$.tags" "$root"
@placek
placek / mainnet-config.json
Last active August 25, 2022 11:36
cardano node 1.35.3 + cardano db sync 13.0.4 + koios
{
"AlonzoGenesisFile": "/opt/cardano/cnode/bin/configuration/cardano/mainnet-alonzo-genesis.json",
"AlonzoGenesisHash": "7e94a15f55d1e82d10f09203fa1d40f8eede58fd8066542cf6566008068ed874",
"ApplicationName": "cardano-sl",
"ApplicationVersion": 1,
"ByronGenesisFile": "/opt/cardano/cnode/bin/configuration/cardano/mainnet-byron-genesis.json",
"ByronGenesisHash": "5f20df933584822601f9e3f8c024eb5eb252fe8cefb24d1317dc3d432e940ebb",
"LastKnownBlockVersion-Alt": 0,
"LastKnownBlockVersion-Major": 3,
"LastKnownBlockVersion-Minor": 0,
# problem 1
+´⊑⌽⊔{∨´0=3‿5|𝕩}¨ ↕1000
dd if=/dev/zero of=/swap_file bs=1G count=16 # create a zero-filled 16GB swap file
fallocate -l 16G /swap_file # alternative, faster way
chmod 600 /swap_file # chmod
mkswap /swap_file # make swap partition on file
swapon /swap_file # apply swap file as a swap partition
Sport strzelecki
Strzelectwo sportowe
Strzelectwo długodystansowe
Strzelectwo westernowe
Strzelectwo czarnoprochowe i historyczne
Strzelectwo kurkowe
Strzelectwo dynamiczne
Dyscypliny sportu strzeleckiego
Pistolet
Karabin
@placek
placek / yubi.nix
Created December 7, 2020 08:12
nix ISOs
# yubikey-installer.nix
{ nixpkgs ? <nixpkgs>, system ? "x86_64-linux" } :
let
config = { pkgs, ... }:
with pkgs; {
imports = [ <nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-graphical-kde.nix> ];
boot.kernelPackages = linuxPackages_latest;
@placek
placek / HowToOTGFast.md
Created October 15, 2019 13:28 — forked from gbaman/HowToOTGFast.md
Simple guide for setting up OTG modes on the Raspberry Pi Zero, the fast way!

###Setting up Pi Zero OTG - The quick way (No USB keyboard, mouse, HDMI monitor needed)
More details - http://blog.gbaman.info/?p=791

For this method, alongside your Pi Zero, MicroUSB cable and MicroSD card, only an additional computer is required, which can be running Windows (with Bonjour, iTunes or Quicktime installed), Mac OS or Linux (with Avahi Daemon installed, for example Ubuntu has it built in).
1. Flash Raspbian Jessie full or Raspbian Jessie Lite onto the SD card.
2. Once Raspbian is flashed, open up the boot partition (in Windows Explorer, Finder etc) and add to the bottom of the config.txt file dtoverlay=dwc2 on a new line, then save the file.
3. If using a recent release of Jessie (Dec 2016 onwards), then create a new file simply called ssh in the SD card as well. By default SSH is

@placek
placek / Dockerfile.local.ci
Last active August 14, 2018 08:32
CI/CD with bash/git/docker-compose
FROM ruby:2.5.1-alpine3.7
RUN apk add --no-cache --update build-base linux-headers git postgresql-dev nodejs tzdata
ENV APP_PATH /www
RUN mkdir -p $APP_PATH
WORKDIR $APP_PATH
COPY Gemfile $APP_PATH/Gemfile