Skip to content

Instantly share code, notes, and snippets.

View Amixp's full-sized avatar
🏠
Working from home

Artem Amixp

🏠
Working from home
  • Alaska
View GitHub Profile
@anutator
anutator / postgresql.md
Last active June 19, 2025 02:32
upgrade postgresql in RedOS

Обновление PostgreSQL в RedOS 7.3.1 с 14 до 15 версии

Нас обязывают использовать российские ОС, и приходится заморачиваться, т.к. новые пакеты добавляют только по заявкам (мы оставили, но ждать долго — RedOS работает с Posgres PRO, тоже российской компанией, а там пока максимальная мажорная версия 14). На текущий момент в RedOS максимальная версия PostgreSQL 14.5.

Версия RedOS может ввести в заблуждение. Кажется, что это аналог CentOS 7, но пакеты для CentOS 7 не подходят, и надо ставить пакеты от Redhat (CentOS, Oracle) 8:

$ cat /etc/*release
RED OS release MUROM (7.3.1) MINIMALNAME="RED OS"
VERSION="MUROM (7.3.1)"
PLATFORM_ID="platform:el7"
@lesovsky
lesovsky / .gitlab-ci.yml
Last active December 31, 2023 15:42
docker-compose with postgresql replication (no volumes, no scripts)
image: golang:1.21.0
stages:
- test
tests/integration:
stage: test
parallel:
matrix:
- VERSION:
- "16-alpine3.18"
package main
import (
"flag"
"log"
"time"
"sync"
"github.com/valyala/fasthttp"
)
var (
kittenhouse = flag.Bool("kittenhouse", false, "Whether or not to send INSERTs in kittenhouse format")

remove gnome apps

sudo dnf remove gnome-tour gnome-abrt gnome-calculator gnome-calendar gnome-maps gnome-weather \
    rhythmbox gnome-contacts totem gnome-logs gnome-photos gnome-clocks gedit gnome-system-moniter \
    gnome-user-docs gnome-screenshot gnome-remote-desktop

remove fedora chromium policies

sudo dnf remove fedora-chromium-config
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.example</groupId>
<artifactId>grpc-hello-server</artifactId>
<version>1.0-SNAPSHOT</version>
@den-crane
den-crane / rename_atomic.txt
Last active August 17, 2020 15:32
rename atomic
create table X1(A Int64) Engine=MergeTree() order by tuple();
create table X2(A Int64) Engine=MergeTree() order by tuple();
cat rename_test.sql
insert into X1 select rand() from numbers(100000);
insert into X1 select rand() from numbers(100000);
alter table X2 replace partition tuple() from X1;
truncate table X1;
@backerman
backerman / profile-snippet-sshargcomplete.ps1
Last active September 11, 2025 15:29
Enable tab completion for ssh hostnames in PowerShell
using namespace System.Management.Automation
Register-ArgumentCompleter -CommandName ssh,scp,sftp -Native -ScriptBlock {
param($wordToComplete, $commandAst, $cursorPosition)
$knownHosts = Get-Content ${Env:HOMEPATH}\.ssh\known_hosts `
| ForEach-Object { ([string]$_).Split(' ')[0] } `
| ForEach-Object { $_.Split(',') } `
| Sort-Object -Unique
# For now just assume it's a hostname.
@carlochess
carlochess / Pyodbc sqlserver lambda
Created September 3, 2018 03:51
How to install Pyodbc for Sqlserver.
# Start a container that mimic the lambda environment
docker run -it --rm --entrypoint bash -e ODBCINI=/var/task -e ODBCSYSINI=/var/task -v "$PWD":/var/task lambci/lambda:build-python2.7
# Then, download ODBC source code, compile and take the output
curl ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-2.3.5.tar.gz -O
tar xvzf unixODBC-2.3.5.tar.gz
cd unixODBC-2.3.5
./configure --sysconfdir=/var/task --disable-gui --disable-drivers --enable-iconv --with-iconv-char-enc=UTF8 --with-iconv-ucode-enc=UTF16LE --prefix=/home
make install
cd ..
@abn
abn / install-jetbrains-toolbox.sh
Last active May 10, 2025 08:00
Install JetBrains Toolbox App
#!/usr/bin/env bash
# Reference: https://github.com/nagygergo/jetbrains-toolbox-install/blob/master/jetbrains-toolbox.sh
# Note that we grep for linux here, if you are using this on mac/windows please see json output
TOOLBOX_URL=$(curl --silent 'https://data.services.jetbrains.com//products/releases?code=TBA&latest=true&type=release' \
-H 'Origin: https://www.jetbrains.com' \
-H 'Accept-Encoding: gzip, deflate, br' \
-H 'Accept-Language: en-US,en;q=0.8' \
-H 'Accept: application/json, text/javascript, */*; q=0.01' \
-H 'Referer: https://www.jetbrains.com/toolbox/download/' \
@DrYazid
DrYazid / starulm.md
Last active December 5, 2024 00:44
StarUml 3.0 full version

StarUML 3.0

  • 1- install staruml. : staruml
  • 2- install node.js : node.js
  • 3- go to ...\AppData\Local\Programs\StarUML\resources
  • 4- open CMD As admin
  • 5- execute