Skip to content

Instantly share code, notes, and snippets.

View beautyfree's full-sized avatar
😼

Alexey Elizarov beautyfree

😼
View GitHub Profile
@beautyfree
beautyfree / README.md
Created September 25, 2023 16:56 — forked from triangletodd/README.md
k3s in LXC on Proxmox

On the host

Ensure these modules are loaded

cat /proc/sys/net/bridge/bridge-nf-call-iptables

Disable swap

sysctl vm.swappiness=0
swapoff -a
import { planetHexasphere } from '../client/hexasphere.js';
import PlanetGenerator from '../client/planet-generator.js';
import '../hybrid/helpers.js';
import { prettyUrl } from '../../../deps.js';
import { getHexagonalGeometry } from '../hybrid/coordinates.js';
class Generator {
constructor() {
return new Promise(async resolve => {
@beautyfree
beautyfree / hetzner-proxmox-docker.sh
Created February 15, 2023 11:02 — forked from theprincy/hetzner-proxmox-docker.sh
Hetzner Dedicated with Debian 10 and Proxmox 6 (LXC) + Docker-CE + Portainer [NAT]
#############################################
### Proxmox V & Docker-CE + Portainer #
#############################################
## Rescue System
# Erase other disks
dd if=/dev/zero of=/dev/sda bs=1M count=100
dd if=/dev/zero of=/dev/sdb bs=1M count=100
# You can install debian 10 via the guide:
@beautyfree
beautyfree / README.md
Last active February 14, 2023 13:00 — forked from gjrdiesel/README.md
Expand Ubuntu 22 Proxmox Disk
# Resize the file system in UI, under VM -> Hardware -> Click on the disk to resize, click "Resize disk" button

# Confirm increase in disk space (1TB in my case)
$ lsblk
NAME                      MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
vda                         8:0    0    1T  0 disk
├─vda1                      8:1    0    1M  0 part
├─vda2                      8:2    0    1G  0 part /boot
└─vda3                      8:3    0    1T  0 part

Keybase proof

I hereby claim:

  • I am beautyfree on github.
  • I am devall (https://keybase.io/devall) on keybase.
  • I have a public key ASDX8aESX-v3tBkJ-a47RfplKnK0zgcO00FmVdi7oCmk-Ao

To claim this, I am signing this object:

@beautyfree
beautyfree / rawTx.js
Created September 30, 2021 23:13
Solana snippet to show raw signed txs
const blockhash = await swapClient.program.provider.connection.getRecentBlockhash();
let txss = txs.map((r) => {
let tx = r.tx;
let signers = r.signers;
if (signers === undefined) {
signers = [];
}
@beautyfree
beautyfree / snippets.js
Last active December 14, 2022 11:49
Solana Web3 Snippets
import {
Account,
clusterApiUrl,
Connection,
PublicKey,
sendAndConfirmTransaction,
SystemProgram,
Transaction,
} from '@solana/web3.js';
@beautyfree
beautyfree / chrome.applescript
Last active April 27, 2020 11:13
Keyboard Maestro Script Chrome Example / thx @nikitavoloboev
tell application "Keyboard Maestro Engine"
set urlToFetch to getvariable "urlToFetch"
end tell
set _win to false
tell application "Google Chrome"
set {idList, urlList} to {id, URL} of every tab of every window
end tell
@beautyfree
beautyfree / mcc-codes.csv
Last active April 4, 2019 09:26
Official dump from founder Denis - http://mcc-codes.ru/code | Actual on 04.04.2019
We can make this file beautiful and searchable if this error is corrected: Illegal quoting in line 6.
id;title;category
0742;Ветеринарные услуги;Контрактные услуги
0763;Сельскохозяйственные кооперативы;Контрактные услуги
0780;Услуги садоводства и ландшафтного дизайна;Контрактные услуги
1520;Генеральные подрядчики – жилое и коммерческое строительство;Контрактные услуги
1711;"Генеральные подрядчики по вентиляции, теплоснабжению и водопроводу";Контрактные услуги
1731;Подрядчики по электричеству;Контрактные услуги
1740;"Изоляция, мозаика, штукатурные работы, каменная кладка, облицовка плиткой, кафелем";Контрактные услуги
1750;Столярные работы;Контрактные услуги
1761;"Кровельные и сайдинговые работы, обработка листового металла";Контрактные услуги
import { path, mergeAll } from 'ramda';
function entitiesReducer(entitiesName, reducer) {
return (state, action) => {
const entities = path(['payload', 'entities', entitiesName], action);
let newState;
if (entities) {
if (state) {