Skip to content

Instantly share code, notes, and snippets.

@Donut3228
Donut3228 / cloudSettings
Last active August 22, 2020 15:05
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-08-22T15:05:02.176Z","extensionVersion":"v3.4.3"}
#!/bin/bash
hey
set -eu
function selinux_setup() {
if [[ ! -e /etc/sysconfig/selinux ]]; then
echo "no selinux file";
else
selinux_disabled="$(cat /etc/sysconfig/selinux)";
fi
PyQt4.x86_64
SDL.x86_64
agg.x86_64
alsa-lib.x86_64
apr.x86_64
apr-util.x86_64
atk.x86_64
atlas.x86_64
audit.x86_64
audit-libs.x86_64
#!/bin/bash
cd /tmp/
wget https://www.python.org/ftp/python/3.6.9/Python-3.6.9.tar.xz
tar -xJf Python-3.6.9.tar.xz
cd Python-3.6.9.tar.xz
./configure
make
make install
#!/bin/bash
# wget https://gist.githubusercontent.com/Donut3228/a31f9a501774ce9edaedab3c3a87e02d/raw/49565e26500eb9d424cc1b04783ce0f97044b981/pokhshop_lxc_install.sh
yum -y install epel-release
yum -y update
yum -y install wget zlib zlib-devel openssh-server openssh-client \
bash-completion bash-completion-extras mlocate vim \
zlib-devel bzip2-devel openssl-devel ncurses-devel \
import os
app_dir = os.path.join(os.path.abspath(os.path.curdir), 'marina/api')
classes = []
def get_models_names():
with open(f'{app_dir}/models.py', 'r') as f:
models = f.read()
# Показать все hidden
document.querySelectorAll(".hiddenHidden").forEach(item => item.classList.remove("hiddenHidden"))
# bash/zsh git prompt support
#
# Copyright (C) 2006,2007 Shawn O. Pearce <[email protected]>
# Distributed under the GNU General Public License, version 2.0.
#
# This script allows you to see the current branch in your prompt.
#
# To enable:
#
# 1) Copy this file to somewhere (e.g. ~/.git-prompt.sh).
#!/bin/bash
GIT_PROMPT_SCRIPT="https://gist.githubusercontent.com/Donut3228/14c1ee7ec1fc272810d29ebf9909e1c3/raw/.git-prompt.sh"
if [[ -f /usr/bin/yum ]]; then
yum -q install -y autojump >/dev/null 2>&1
fi
if [[ -f /usr/bin/autojump && -f /usr/share/autojump/autojump.bash ]]; then
source /usr/share/autojump/autojump.sh || true >/dev/null 2>&1
fi
@Donut3228
Donut3228 / install.sh
Last active January 2, 2021 09:02
Git hooks
#!/bin/bash
if [ ! -d ".git" ]; then
echo "Change directory to project root"
exit 1
fi
PREPARE_COMMIT_MSG_HOOK_URL="https://gist.githubusercontent.com/Donut3228/8b205847a0275222bb44c57905e2b686/raw/prepare-commit-msg"
PREPARE_COMMIT_MSG_HOOK_PATH=".git/hooks/prepare-commit-msg"
wget -O "$PREPARE_COMMIT_MSG_HOOK_PATH" "$PREPARE_COMMIT_MSG_HOOK_URL"