Table of Contents
* Generic Syntax
* Main Options
* Encoding :
| #!/bin/bash | |
| ROOTPASS="password" | |
| echo "Enter username to delete:" | |
| read USERNAME | |
| mysql -uroot --password=$ROOTPASS -e "DROP USER $USERNAME@localhost" | |
| mysql -uroot --password=$ROOTPASS -e "DROP DATABASE $USERNAME" | |
| rm -f /etc/nginx/sites-enabled/$USERNAME.conf |
| <?php | |
| /** | |
| * Password generate | |
| * | |
| * @category generate | |
| * @version 0.1 | |
| * @license GNU General Public License (GPL), http://www.gnu.org/copyleft/gpl.html | |
| * @param string $len длина пароля | |
| * @param string $data правила генерации пароля | |
| * @return string Строка с паролем |
| # install dependencies | |
| sudo apt-get update | |
| sudo apt-get install -y build-essential | |
| sudo apt-get install -y cmake | |
| sudo apt-get install -y libgtk2.0-dev | |
| sudo apt-get install -y pkg-config | |
| sudo apt-get install -y python-numpy python-dev | |
| sudo apt-get install -y libavcodec-dev libavformat-dev libswscale-dev | |
| sudo apt-get install -y libjpeg-dev libpng12-dev libtiff5-dev libjasper-dev | |
| """ | |
| Dependencies: | |
| pip install tabulate simplejson python-cjson ujson yajl msgpack-python | |
| """ | |
| from timeit import timeit | |
| from tabulate import tabulate |
| #!/usr/bin/env bash | |
| # Documentation | |
| # https://docs.gitlab.com/ce/api/projects.html#list-projects | |
| NAMESPACE="YOUR_NAMESPACE" | |
| BASE_PATH="https://gitlab.example.com/" | |
| PROJECT_SEARCH_PARAM="" | |
| PROJECT_SELECTION="select(.namespace.name == \"$NAMESPACE\")" | |
| PROJECT_PROJECTION="{ "path": .path, "git": .ssh_url_to_repo }" |
| # import config. | |
| # You can change the default config with `make cnf="config_special.env" build` | |
| cnf ?= config.env | |
| include $(cnf) | |
| export $(shell sed 's/=.*//' $(cnf)) | |
| # import deploy config | |
| # You can change the default deploy config with `make cnf="deploy_special.env" release` | |
| dpl ?= deploy.env | |
| include $(dpl) |
| #!/bin/bash | |
| ## This gist contains step by step instructions to install cuda v9.0 and cudnn 7.2 in ubuntu 18.04 | |
| ### steps #### | |
| # verify the system has a cuda-capable gpu | |
| # download and install the nvidia cuda toolkit and cudnn | |
| # setup environmental variables | |
| # verify the installation | |
| ### |
| FROM traefik:v2.2 | |
| RUN touch acme.json | |
| RUN chmod 600 acme.json |