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 April 26, 2024 08:25 — forked from gjreasoner/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
@beautyfree
beautyfree / extract.py
Created November 17, 2015 00:59 — forked from kalloc/extract.py
#!/usr/bin/env python3
import nltk
import re
import sys
import json
import string
from nltk.corpus import stopwords
import pymorphy2
@beautyfree
beautyfree / seostat.py
Created November 16, 2015 22:56 — forked from otykhonruk/seostat.py
Simple SEO-related text metrics.
import re
import sys
from collections import Counter
from pymorphy2 import MorphAnalyzer
morph = MorphAnalyzer()
def words(text):
return re.findall('[а-яА-Яa-zA-Z-]+', text.lower())
@beautyfree
beautyfree / loop.js
Last active August 29, 2015 14:23 — forked from nosalvage/loop.js
angular.forEach(items, function(item, key) {
if(item.attachments){
angular.forEach(item.attachments, function(attachment, key) {
if(attachment.type == 'video') {
feed.getVideo(attachment.video.owner_id, attachment.video.owner_id+'_'+attachment.video.id).then(function(result){
videos[item.id].player = result.data.response.items[0].player;
});
}
}
}
@beautyfree
beautyfree / derji.js
Last active August 29, 2015 14:23 — forked from anonymous/derji
.factory('feed', function($http, vk, $localStorage){
var owner_id = '-34882023';
var version = '5.34';
var count = '5';
var items = [];
var liked;
var isLiked = function(itemId){
return vk.call('likes.isLiked', {item_id: itemId, owner_id: owner_id, access_token: $localStorage.token, type: 'post', v: version}).then(function(result){
return result;
}, function(err){console.log('err' + err)});