Skip to content

Instantly share code, notes, and snippets.

View 40a's full-sized avatar

40a

View GitHub Profile
@40a
40a / yg.sh
Created March 29, 2019 16:46 — forked from epcim/yg.sh
#salt #reclass parser - works as jq for yaml files, used to traverse all paths in #Salt reclass and find/grep tree paterns
#!/bin/bash
# tl;dr
# yaml-grep; to extract partial branches based on the 'jq' regex pattern.
# install:
# wget https://gist.githubusercontent.com/epcim/f1c5b748fa7c942de50677aef04f29f8/raw/yg.sh -O yg; chmod +x yg
# usage:
# ./yg '.compute?.network'
#
@40a
40a / Setting up Google Cloud Storage with CORS for Web Fonts.md
Created October 17, 2018 08:47 — forked from mhulse/Setting up Google Cloud Storage with CORS for Web Fonts.md
Setting up CORS on Google Cloud Storage: An unofficial quick start guide to serving web fonts from Google's cloud. (I'm sure a lot of this info could be improved... Please leave comments if you have tips/improvements.)

Login:

Google Cloud Storage

You'll want to login using an official Google account (i.e. if this is for your company, use the comapany Gmail account vs. a personal one.)

When logging in, you might be prompted to verify the account; if so, enter your cell number to get a verification e-mail or phone call.

Once verified, you'll have to agree to the terms of service; do that, and click continue.

# This file must contain only ISO 8859-1 characters.
# See http://docs.oracle.com/javase/1.5.0/docs/api/java/util/Properties.html#load(java.io.InputStream)
#
# Property values can:
# - reference an environment variable, for example sonar.jdbc.url= ${env:SONAR_JDBC_URL}
# - be encrypted. See http://redirect.sonarsource.com/doc/settings-encryption.html
#--------------------------------------------------------------------------------------------------
# DATABASE
@40a
40a / Dockerfile
Created October 3, 2018 20:21 — forked from dmitrygusev/Dockerfile
Jenkins in Docker
FROM jenkins/jenkins:2.138.1
USER root
RUN apt-get update -y && apt-get install -y \
python-pip \
sudo
RUN pip install awscli --upgrade
@40a
40a / Jenkinsfile.groovy
Created September 26, 2018 13:43 — forked from Faheetah/Jenkinsfile.groovy
Jenkinsfile idiosynchrasies with escaping and quotes
node {
echo 'No quotes, pipeline command in single quotes'
sh 'echo $BUILD_NUMBER'
echo 'Double quotes are silently dropped'
sh 'echo "$BUILD_NUMBER"'
echo 'Even escaped with a single backslash they are dropped'
sh 'echo \"$BUILD_NUMBER\"'
echo 'Using two backslashes, the quotes are preserved'
sh 'echo \\"$BUILD_NUMBER\\"'
echo 'Using three backslashes still results in preserving the single quotes'
@40a
40a / teamleadconf.md
Created September 25, 2018 10:24 — forked from lananovikova10/teamleadconf.md
additional materials from teamlead conf

Тут живут драконы. Матрица навыков как инструмент тимлида

Другие варианты матриц для команд разработки

#!/usr/bin/env bash
# MongoDB port
PORT=27017
# Consul key to setup the lock
MONGO_KEY="mongodb/replicaset"
#
# Retrieve MongoDB instance IPs from Consul
#
@40a
40a / start_docker_registry.bash
Created August 21, 2018 11:52 — forked from PieterScheffers/start_docker_registry.bash
Start docker registry with letsencrypt certificates (Linux Ubuntu)
#!/usr/bin/env bash
# install docker
# https://docs.docker.com/engine/installation/linux/ubuntulinux/
# install docker-compose
# https://docs.docker.com/compose/install/
# install letsencrypt
# https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-16-04
@40a
40a / Download Google Drive files with WGET
Created August 2, 2018 06:43 — forked from iamtekeste/Download Google Drive files with WGET
Download Google Drive files with WGET
Download Google Drive files with WGET
Example Google Drive download link:
https://docs.google.com/open?id=[ID]
To download the file with WGET you need to use this link:
https://googledrive.com/host/[ID]
Example WGET command: