Skip to content

Instantly share code, notes, and snippets.

@aursu
aursu / bintray-upload.md
Last active July 23, 2018 01:56
Bintray: Uploading (upload to Bintray description)

Distributing files via Bintray includes three steps: creating a version, uploading the files and publishing the files.

  1. Creating a version: Uploaded files are associated with a specific version of a package. Some upload methods can create the version automatically as part of the upload; with other methods you will need to create a target version from the Bintray UI or using REST.

  2. Uploading: Upload your files using one of the methods described in the "Uploading" section. After uploading your files, the files have a status of "un-published". This means that in the Bintray UI they are only visible to you and can only be downloaded with your username and API Key. You may discard all or some of your uploaded files when they are "un-published", before anyone sees or downloads them.

@aursu
aursu / bintray-download.md
Last active July 19, 2018 00:06
Bintray: Resolving RPM packages

For more information about downloading using APIs, please see the documentation.

This is what you need to do to resolve RPM artifacts from Bintray:

  1. Run the following to get a generated .repo file:

    wget https://bintray.com/aursu/custom/rpm -O bintray-aursu-custom.repo
    
@aursu
aursu / 30-mtu
Created July 18, 2018 20:45
/etc/NetworkManager/dispatcher.d/30-mtu: set MTU on startup
#!/bin/sh
interface=$1
if [ "$2" = "up" -a -f /etc/sysconfig/network-scripts/ifcfg-$interface ]; then
/usr/sbin/ip link set dev $1 mtu 1390
fi
@aursu
aursu / answerhub-onpremise-upgrade.sh
Last active July 30, 2018 16:47
AnswerHub On-Premise upgrade script
#!/bin/bash
set -e
APPROOT=/var/www/answerhub
BKPSUF=$(date +%Y-%m-%d:%H:%M)
PERM="tomcat:tomcat"
STOPCMD="systemctl stop tomcat"
STARTCMD="systemctl restart tomcat"
@aursu
aursu / cd-dvd-anaconda-ks.cfg
Last active July 30, 2018 16:48
Anaconda kickstart file Fedora Workstation Media CD/USB
#version=DEVEL
# Clear the Master Boot Record
zerombr
# Partition clearing information
clearpart --all
# Shutdown after installation
shutdown
# Use text mode install
text --non-interactive
repo --name="koji-override-0" --baseurl=http://kojipkgs.fedoraproject.org/compose/28/Fedora-28-20180425.0/compose/Everything/$basearch/os
@aursu
aursu / circleci.note.md
Last active July 12, 2018 09:48
CircleCI documentation URLs

#circleci

A run is comprised of one or more named jobs. Jobs are specified in the jobs map. The name of the job is the key in the map, and the value is a map describing the job.

If you are using Workflows, jobs must have a name that is unique within the .circleci/config.yml file.

@aursu
aursu / docker-registry.note.txt
Last active July 9, 2018 22:32
Docker registry docs
https://docs.docker.com/registry/
https://docs.docker.com/registry/introduction/
https://docs.docker.com/registry/deploying/
GitHub:
https://github.com/docker/distribution
@aursu
aursu / 99-nginx-logging.conf
Last active July 30, 2018 16:50
GitLab Omnibus distribution | Nginx nginx.conf: include /etc/nginx/conf.d/99-nginx-logging.conf
log_format gitlab_access '$remote_addr - $remote_user [$time_local] "$request_method $filtered_request_uri $server_protocol" $status $body_bytes_sent "$filtered_http_referer" "$http_user_agent"';
log_format gitlab_mattermost_access '$remote_addr - $remote_user [$time_local] "$request_method $filtered_request_uri $server_protocol" $status $body_bytes_sent "$filtered_http_referer" "$http_user_agent"';
# Remove private_token from the request URI
# In: /foo?private_token=unfiltered&authenticity_token=unfiltered&rss_token=unfiltered&...
# Out: /foo?private_token=[FILTERED]&authenticity_token=unfiltered&rss_token=unfiltered&...
map $request_uri $temp_request_uri_1 {
default $request_uri;
~(?i)^(?<start>.*)(?<temp>[\?&]private[\-_]token)=[^&]*(?<rest>.*)$ "$start$temp=[FILTERED]$rest";
@aursu
aursu / 00-proxy.conf
Last active July 30, 2018 16:51
GitLab Omnibus distribution | Nginx nginx.conf: include /etc/nginx/conf.d/00-proxy.conf
# http://nginx.org/en/docs/http/websocket.html
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}