This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://wiki.gentoo.org/wiki/Handbook:Parts/Full/Installation/ru#Preparing_for_a_bootloader | |
# https://docs.google.com/presentation/d/1SXYB4gOw2psL1SKD6gAC7akyiVb9S1AqqMdLHqqg_Vc/pub?slide=id.g1491c09ef8_0_47 | |
# https://www.youtube.com/watch?v=Lwed13zSS_0 | |
# https://danielmiessler.com/p/the-difference-between-system-v-and-systemd/ | |
# https://wiki.gentoo.org/wiki/CPU_FLAGS_*/ru | |
# https://wiki.gentoo.org/wiki/OpenRC_to_systemd_Cheatsheet | |
# https://lna.org.ru/book/export/html/53 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
dc=${1} | |
if [ ! -z ${dc} ] && [ -f ${dc} ]; then | |
echo "Saving docker images from file ${dc}..." | |
images=`grep image: ${dc} | awk '{print $2}'` | |
docker save ${images} | gzip > docker-images.gz | |
echo "Success!" | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~/.profile: executed by the command interpreter for login shells. | |
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login | |
# exists. | |
# see /usr/share/doc/bash/examples/startup-files for examples. | |
# the files are located in the bash-doc package. | |
# the default umask is set in /etc/profile; for setting the umask | |
# for ssh logins, install and configure the libpam-umask package. | |
#umask 022 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def split_file(input_file, lines_per_segment=1000000, encoding='utf-8'): | |
with open(input_file, 'r', encoding=encoding) as file: | |
content = file.readlines() | |
num_segments = len(content) // lines_per_segment + (len(content) % lines_per_segment > 0) | |
for i in range(num_segments): | |
start_idx = i * lines_per_segment | |
end_idx = (i + 1) * lines_per_segment | |
segment_content = content[start_idx:end_idx] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Intro | |
Xerox said that Phaser 3140 hass "level 2" of support which means that Xerox not planning to update it's driver any way. | |
macOS no longer supports 32bit apps since macOS Catalina, and Xerox drivers installer provided at xerox.com is 32bit-app. But drivers will still work if we can install it. So we just need to install drivers itself manually. | |
To make it old printers work you just need to copy few files from installer to their designed locations. | |
# Download | |
You can download unpacked files from macOS 10.14 (10.11+) or unpack from official site by yourselve. | |
https://yadi.sk/d/K4Z-FlHFTyT2BQ?w=1 | |
#Installation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: busybox | |
namespace: default | |
spec: | |
containers: | |
- image: busybox | |
command: | |
- sleep |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from os.path import join as jn | |
from shutil import copyfile | |
from multiprocessing import Pool, cpu_count | |
from datetime import datetime | |
from tqdm import tqdm | |
src = "/Users/krared/from" | |
dest = "/Users/krared/to" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# divide set on 3 parts | |
import pickle | |
import numpy as np | |
your_set = {'1','2','3'} | |
triple_split = np.array_split(your_set, 3) | |
name_of_split = 'set_of_' | |
for i in range(len(triple_split)): | |
with open(f'{name_of_split}_{i}.pickle', 'wb') as handle: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--------- SET STATIC IP --------- | |
sudo nano /etc/netplan/01-netcfg.yaml | |
sudo nano /etc/hosts | |
ip1 k8s-master | |
ip2 k8s-node1 | |
ip3 k8s-node2 | |
sudo netplan apply | |
ip a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
adb reboot bootloader | |
fastboot flash recovery twrp.img | |
# fastboot boot twrp.img | |
fastboot reboot recovery | |
adb reboot recovery | |
for file in *.apk; do adb install $file; done |
NewerOlder