Skip to content

Instantly share code, notes, and snippets.

@itcxua
itcxua / kickstart.sh
Created August 16, 2024 09:36 — forked from dtomvan/kickstart.sh
Installs kickstart.nvim
#!/usr/bin/env bash
set -euo pipefail
[ -d ~/.config/nvim/ ] && echo "Backing up existing .config/nvim to appname nvim-old" && mv -v ~/.config/nvim ~/.config/nvim-old
[ -d ~/.local/share/nvim/ ] && echo "Backing up existing .local/share/nvim to appname nvim-old" && mv -v ~/.local/share/nvim ~/.local/share/nvim-old
echo "Installing kickstart.nvim"
git --version || (echo "GIT not found. Please install it https://git-scm.com/downloads" && exit 1)
git clone https://github.com/nvim-lua/kickstart.nvim.git ~/.config/nvim
echo "Successfully downloaded your new config!"
@itcxua
itcxua / installNetdataWithAnsible.sh
Created August 16, 2024 09:34 — forked from ricsiga/installNetdataWithAnsible.sh
install Netdata with Ansible
#!/usr/bin/env bash
ansible -s -i inventoryFile -m shell -a "curl -Ss -o kickstart-static64.sh https://my-netdata.io/kickstart-static64.sh" all
ansible -s -i inventoryFile -m shell -a "chmod 750 kickstart-static64.sh" all
ansible -s -i inventoryFile -m shell -a "./kickstart-static64.sh --non-interactive" all
#version=DEVEL
# System authorization information
auth --enableshadow --passalgo=sha512
# Use CDROM installation media
cdrom
# Use graphical install
graphical
# Run the Setup Agent on first boot
firstboot --enable
ignoredisk --only-use=vda
@itcxua
itcxua / empty-wp-plugin.php
Created November 8, 2023 20:39 — forked from sareiodata/empty-wp-plugin.php
Empty WordPress plugin
<?php
/**
* Plugin Name: Name Of The Plugin
* Plugin URI: http://URI_Of_Page_Describing_Plugin_and_Updates
* Description: A brief description of the Plugin.
* Version: The Plugin's Version Number, e.g.: 1.0
* Author: Name Of The Plugin Author
* Author URI: http://URI_Of_The_Plugin_Author
* License: A "Slug" license name e.g. GPL2
*/
@itcxua
itcxua / wp-cli-oneclick-install.sh
Created July 17, 2023 15:48 — forked from mih4ajlo/wp-cli-oneclick-install.sh
Customized wordpress install script with WP CLI
#!/bin/bash
# Install Wordpress with Square Candy default using WP CLI
read -p 'Site URL (example.com): ' url
read -p 'Site Title: ' title
read -p 'WP Admin username: ' admin_user
read -sp 'WP Admin password: ' admin_password
read -p '
WP Admin email: ' admin_email
read -p 'Database name: ' dbname
read -p 'Database user: ' dbuser
#!/bin/bash
# Перекодирует рекурсивно в текущем каталоге имена
# файлов и каталогов в транслит.
#
# Источник: http://www.ubuntu.sumy.ua/2011/03/translit.html
shopt -s nullglob
for NAME in * ; do
TRS=`echo $NAME | sed "y/абвгдезийклмнопрстуфхцы/abvgdezijklmnoprstufxcy/"`
TRS=`echo $TRS | sed "y/АБВГДЕЗИЙКЛМНОПРСТУФХЦЫ/ABVGDEZIJKLMNOPRSTUFXCY/"`