Skip to content

Instantly share code, notes, and snippets.

@janeczku
janeczku / 00-cloud-config.yml
Last active June 10, 2023 15:10
Annotated RancherOS Cloud-init configuration snippets
#cloud-config
# Set the hostname for this machine (takes precedence over hostname assigned by DHCP lease).
hostname: myhost
# Authorize SSH keys for the `rancher` sudoer user
ssh_authorized_keys:
- ssh-rsa AAA...ZZZ example1@rancher
@virtuman
virtuman / gitlab-docker-registry-cleanup-old-tags.php
Created January 29, 2018 22:28
gitlab docker registry cleanup through API + screen scraping
<?php
# Accepts command line arguments:
# -url=https://gitlab.example.com/
# -token=GITLAB_TOKEN
# -debug=false | true
# -dryrun=false | true
# -keep=2 day
@JulienBreux
JulienBreux / aliases.sh
Last active September 7, 2023 04:13
Kubernetes term aliases
# Used to run minikube shortly
alias mk="minikube"
# Used to run kubectl shortly
alias k="kubectl"
# Used to get ...
alias kg="kubectl get"
# Used to get all pods
@vothanhkiet
vothanhkiet / guide.md
Last active January 10, 2022 11:52
HA-Proxy for Portainer

HA-Proxy configuration for Portainer

Here is a working configuration for HA-Proxy version 1.6.6 2016/06/26 to serve Portainer at portainer.127.0.0.1.xip.io :

global
    maxconn                     10000
    daemon
    ssl-server-verify           none
    tune.ssl.default-dh-param   2048
export LS_OPTIONS='--color=auto'
alias ls='ls $LS_OPTIONS'
alias ll='ls $LS_OPTIONS -l'
alias l='ls $LS_OPTIONS -lA'
PS1='${debian_chroot:+($debian_chroot)}\[\033[31m\][\t] \[\033[31m\]\u\[\033[00m\]@\[\033[32m\]\h:\W\[\033[00m\]$ '
{
"title": "Magento performance",
"services": {
"query": {
"list": {
"0": {
"query": "*",
"alias": "",
"color": "#7EB26D",
"id": 0,
input {
file {
type => "magento-perf"
path => "/opt/hosting/elk-magento/www/var/log/elk-magento.log"
}
}
filter {
if [type] == "magento-perf" {
@HuangFJ
HuangFJ / install_opencv2.4.9.sh
Last active November 11, 2021 14:08 — forked from mitmul/install_opencv2.4.8.sh
centos 6.5 + opencv 2.4.9 + ffmpeg 0.10.11 + python 2.7.7 自动安装脚本
#! /bin/bash
sudo yum install -y gcc g++ gtk+-devel libjpeg-devel libtiff-devel jasper-devel libpng-devel zlib-devel cmake unzip sqlite-devel readline-devel bzip2-devel openssl-devel ncurses-devel
sudo yum install -y yum-priorities
sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
sudo yum install -y eigen3-devel --enablerepo=epel
su -c 'yum localinstall --nogpgcheck http://download1.rpmfusion.org/free/el/updates/6/i386/rpmfusion-free-release-6-1.noarch.rpm http://download1.rpmfusion.org/nonfree/el/updates/6/i386/rpmfusion-nonfree-release-6-1.noarch.rpm'
sudo yum install -y ffmpeg-devel
export PYTHON_PREFIX=/usr/local/python-2.7.7
@chiraggude
chiraggude / Install Ruby and RubyGems
Last active December 14, 2018 07:14
Install Ruby 2.1.1 and RubyGems 1.8.25 on CentOS 6.5
# Install Ruby
wget http://ftp.ruby-lang.org/pub/ruby/2.1/ruby-2.1.1.tar.gz
tar xvzf ruby-2.1.1.tar.gz
cd ruby-2.1.1
./configure --prefix=/usr
make
make install
# remove "ruby-2.1.1" folder in /root