This file contains hidden or 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 | |
import sys | |
import time | |
import random | |
import argparse | |
# Key is country code, value is the number of servers to use | |
SERVER_LIST = { | |
"AR": [*range(1, 8)], | |
"AU": [*range(13, 44)], |
This file contains hidden or 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/sh | |
# Backup Partititon | |
dd if=/dev/sda of=/mnt/backup/sda.img conv=noerror | |
fdisk -l /dev/sda > /mnt/backup/sda.info | |
dd if=/dev/sdb of=/mnt/backup/sdb.img conv=noerror | |
fdisk -l /dev/sdb > /mnt/backup/sdb.info | |
# execute "git pull" in every dir | |
for dir in ~/projects/git/* |
This file contains hidden or 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 | |
# Install | |
pip3 install --user virtualenv | |
virtualenv –version | |
# Activate | |
virtualenv venv | |
source venv/bin/activate |
This file contains hidden or 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
rem 1. | |
sc config "Name of Service" start= disabled | |
sc stop "Name of Service" | |
rem 2. | |
wmic service where name='SQLWriter' call ChangeStartmode Disabled | |
rem https://www.minitool.com/news/windows-10-services-to-disable.html | |
rem https://helpdeskgeek.com/windows-10/windows-10-unnecessary-services-you-can-disable-safely/ | |
rem https://www.groovypost.com/howto/12-windows-10-services-that-are-safe-to-disable/ |
This file contains hidden or 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
#include <iostream> | |
#include <numeric> | |
#include <vector> | |
/// @brief: Calculates array of same size, where each element is the product | |
/// of all elements excluding corresponding by index | |
/// Algorithm: O(n) time, O(n) space | |
/// @param: array of int | |
/// @return: array of same size | |
/// @example: {1,2,3,4} => {24, 12, 8, 6}, {1, 2, 3, 4, 5} => {120, 60, 40, 30, 24} |
OlderNewer