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
| docker run -i -t gitlab/gitlab-ce:8.9.6-ce.0 /bin/bash | |
| curl -sSL https://get.docker.com/ | sh | |
| curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-ci-multi-runner/script.deb.sh | sudo bash |
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 | |
| # | |
| # This version uses September 2016 rpi jessie image, please use this image | |
| # | |
| if [ "$EUID" -ne 0 ] | |
| then echo "Must be root" | |
| exit | |
| fi |
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 | |
| if [ -e /sys/class/power_supply/BAT0 ]; then | |
| zenity --warning --text "STARTED MONITORING BATERY" | |
| while true;do | |
| CAPACITY=$( cat /sys/class/power_supply/BAT0/uevent | grep -i capacity | cut -d'=' -f2|head -1 ) | |
| case $CAPACITY in | |
| [0-9]|11) | |
| STATUS=$( cat /sys/class/power_supply/BAT0/uevent | grep -i status | cut -d'=' -f2 | head -1) |
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
| node { | |
| stage 'Checkout' | |
| checkout scm | |
| env.BUILD_TAG_CLEANED = "${env.BUILD_TAG}".replaceAll(/\%\d[a-zA-Z]/, "-").replaceAll(/[^\w-]+/, "") | |
| env.ENABLE_TWO_FACTOR = 'false' | |
| env.ENVIRONMENT_INSTANCE = 'dev03' // test build sandbox for branches != develop | |
| if (env.BRANCH_NAME == 'develop') { |
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 | |
| CF=~/.git-dprz.sh | |
| function info { | |
| cat <<- INFO | |
| -- Script for downloading PRIVATE(!) git-repos as tar-archive on old systems (like Debian Etch) | |
| -- That only have old git - binaries | |
| -- |
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,sys,time,math | |
| def radius_dl(radius): | |
| return (int(math.pi * 2 *int(radius))) | |
| def polovina_kruga(radius): | |
| return (int(math.pi * (int(radius) ** 2))/2) | |
| def banner(): | |
| print("*"*50) | |
| # Функция расчета площади эллипса, то-есть лицевого фасада |
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
| Notes from here: http://www.webupd8.org/2010/01/how-to-create-deb-package-ubuntu-debian.html | |
| This assumes you're using autotools to build your project. | |
| 1. sudo apt-get install build-essential autoconf automake autotools-dev dh-make debhelper devscripts fakeroot xutils lintian pbuilder | |
| 2. We want a source folder with the pattern: <package>-<version> | |
| $ cd ginvoke | |
| $ git archive --format=tar --prefix=ginvoke-$(date +'%Y%m%d')/ master | tar xvf - -C .. |
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
| ansible-playbook -vv -i inventory/kubernetis.ini provision.yml --extra-vars="hostName=all" \ | |
| -e is_sys_prepare=true \ | |
| -e is_install_deps=true \ | |
| -e is_install_master=true \ | |
| -e is_install_minion=true \ | |
| -e is_create_config=true \ | |
| -e is_last_step=true |
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 numpy as np | |
| import base64 | |
| import urllib | |
| from PIL import Image | |
| #Convert image to base64 thumbnail | |
| def img2base64(img_link): | |
| with open("/tmp/img_file.jpg", "wb") as f: | |
| f.write(urllib.request.urlopen(img_link).read()) | |
| tmp_img = np.asarray(Image.open("/tmp/img_file.jpg")) |
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
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| """Kenneth Reitz's GitHub Syncer | |
| This script uses the GitHub API to get a list of all forked, mirrored, public, and | |
| private repos in your GitHub account. If the repo already exists locally, it will | |
| update it via git-pull. Otherwise, it will properly clone the repo. | |
| It will organize your repos into the following directory structure: |