Skip to content

Instantly share code, notes, and snippets.

@vadikgo
vadikgo / compare-jenkins-plugins.yml
Last active November 9, 2018 07:09
Compare jenkins plugins
- name: Compare plugins
hosts: jenkins[0]
gather_facts: false
#connection: local
tasks:
- name: Load active plugins list from Jenkins
jenkins_script:
script: |
import groovy.json.JsonOutput
def plugins = []
@vadikgo
vadikgo / fpsu-ip-client.txt
Last active December 26, 2019 11:27
fpsu client for ubuntu
Install dependencies:
sudo apt install gcc make libc6 linux-headers-generic libccid pcscd libpcsclite1 libgtk2.0-0 gtk2-engines-pixbuf libelf-dev libcanberra-gtk-module -y
Download fpsu ip client:
http://amicon.ru/forum/index.php?attachments/5-0-23_centos_7-5-zip.589/
Download citrix workspace:
https://www.citrix.com/downloads/workspace-app/linux/workspace-app-for-linux-latest.html
Install private CA certificates:
@vadikgo
vadikgo / loop.go
Last active October 3, 2018 21:51
golang loop
package main
import (
"fmt"
"os"
)
func main() {
tasks := []int{1, 2, 3, 4, 5, 6, 7, 8, 9}
qs := 4
@vadikgo
vadikgo / upload-nexus-pip
Last active December 26, 2019 11:37
Upload file to nexus
#!/bin/bash
set -e
nexus="http://nexus/nexus/content/repositories/pypi/simple"
if [ -z "${1}" ] || [ -z "${NEXUS_USER}" ] || [ -z "${NEXUS_PASSWORD}" ]; then
echo "Upload pip file to Nexus"
echo "Usage:"
echo "${0} [filename]"
echo "Use repo: pip install sphinx --index-url=\"${nexus}\" --trusted-host=\"nexus\""
echo "Script depends on ruby python-pip pip-wheel curl basename"
@vadikgo
vadikgo / upload-pypi.sh
Last active June 9, 2018 11:47
Upload python packages to private repository
#!/bin/bash
set -e
if [ -z "$1" ]; then
echo "Upload pip file to minio"
echo "Usage:"
echo "${0} filename"
echo "use repo: pip install sphinx --index-url=\"http://10.116.99.190/files/python/pypi/\" --trusted-host=\"10.116.99.190\""
exit 0
fi
@vadikgo
vadikgo / gem-fetch-dependencies.rb
Created April 12, 2018 12:40 — forked from drhuffman12/gem-fetch-dependencies.rb
Extend 'gem fetch' command. Fetch all dependencies. Handles OS (Windows vs non-Windows) and Ruby Platform (JRuby vs Ruby).
#!/usr/bin/ruby
=begin
## USAGE:
# Ruby:
ruby gem-fetch-dependencies.rb fetch <gem_name> --dependencies
# JRuby:
jruby gem-fetch-dependencies.rb fetch <gem_name> --dependencies
@vadikgo
vadikgo / kernel.yml
Last active March 27, 2018 12:23
select boot kernel with ansible
kernel_lt_version: 4.4.122
kernel_lt_package: kernel-lt-{{ kernel_lt_version }}
- name: install kernel 4.x
yum: name={{ kernel_lt_package }}
register: kernel_update
- block:
- name: upgrade all packages
@vadikgo
vadikgo / pull.yml
Last active March 26, 2018 20:31
Pull Kubespray images
---
- hosts: localhost
connection: local
tasks:
- name: Load containers tags
include_vars: "{{ item }}"
with_items:
- ../kubespray/roles/download/defaults/main.yml
- ../kubespray/roles/kubernetes-apps/ansible/defaults/main.yml
- ../var/images.yml
@vadikgo
vadikgo / once.py
Created March 25, 2018 09:45
Change IBM WAS web admin port
import os
import socket
execfile('/wsadminlib/wsadminlib.py')
serverName = os.environ['SERVER_NAME']
nodeName = os.environ['NODE_NAME']
cellName = os.environ['CELL_NAME']
hostName = socket.gethostname()
@vadikgo
vadikgo / web-servers.md
Created March 19, 2018 22:19 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000