Skip to content

Instantly share code, notes, and snippets.

View rrrru's full-sized avatar
🐒
TDD

Ruslan Nigmatullin rrrru

🐒
TDD
  • Another OJSC
  • Russia, Default City
  • X @ruslash
View GitHub Profile
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Amazon;
using Amazon.S3;
using Amazon.S3.Model;
using Amazon.S3.Transfer;
#!/usr/bin/env python3
"""
Import/Export tool for Consul Key-Value storage.
If your server has ACL enabled,
be sure to export CONSUL_HTTP_TOKEN env variable or use -t to provide a token
Usage:
Export KV storage decoding values
#!/bin/bash
set -e # Exit immediately if a command fails
compose_file="/opt/docker-compose.yml"
cert_dir="/opt/certs/"
echo "Removing old files and conflicts..."
docker-compose -f "$compose_file" down || true # Stop any running containers and ignore errors
rm -rf /opt/{config,gitea,docker-compose.yml,certs}
#!/bin/bash
echo
read -p "Enter new username for gitea: " gitea_username < /dev/tty
read -p "Enter new password for gitea: " gitea_passwd < /dev/tty
apt-get update && apt-get -y install ansible
ansible-galaxy install geerlingguy.docker --roles-path=/tmp/roles
#!/bin/bash
# IMPORTANT: Don't forget to logout from your Apple ID in the settings before running it!
# IMPORTANT: You will need to run this script from Recovery. In fact, macOS Catalina brings read-only filesystem which prevent this script from working from the main OS.
# This script needs to be run from the volume you wish to use.
# E.g. run it like this: cd /Volumes/Macintosh\ HD && sh /Volumes/Macintosh\ HD/Users/sabri/Desktop/disable.sh
# WARNING: It might disable things that you may not like. Please double check the services in the TODISABLE vars.
# Get active services: launchctl list | grep -v "\-\t0"
# Find a service: grep -lR [service] /System/Library/Launch* /Library/Launch* ~/Library/LaunchAgents
@rrrru
rrrru / DisableBigSur.sh
Created May 29, 2022 17:44 — forked from b0gdanw/DisableBigSur.sh
Disable Big Sur services
#!/bin/zsh
#Credit: Original idea and script disable.sh by pwnsdx https://gist.github.com/pwnsdx/d87b034c4c0210b988040ad2f85a68d3
#Disabling unwanted services on macOS 11 Big Sur (11) and macOS Monterey (12)
#Disabling SIP is required ("csrutil disable" from Terminal in Recovery)
#Modifications are written in /private/var/db/com.apple.xpc.launchd/ disabled.plist, disabled.501.plist & disabled.205.plist
# user
TODISABLE=()
@rrrru
rrrru / doctl
Created May 13, 2022 14:04 — forked from android10/doctl
Digital Ocean Command Line Interface
DOCTL
Installation
Option 1 – Download a Release from GitHub
Visit the Releases page for the doctl GitHub project.
https://github.com/digitalocean/doctl/releases
tar xf ~/doctl-1.4.0-linux-amd64.tar.gz
sudo mv ~/doctl /usr/local/bin
Configure
#!/usr/bin/env bash
cd "$(dirname "$0")"
usage() {
cat <<EOF
Usage: do.sh <action> <project> <action specific arguments>
Supported actions:
build
build-lib