Skip to content

Instantly share code, notes, and snippets.

View jbialy's full-sized avatar
🤓

Janusz Bialy jbialy

🤓
View GitHub Profile
@purp
purp / EdgeOS_SSH_Tricks.md
Last active January 28, 2024 20:21
Adding SSH keys to Ubiquiti EdgeRouter X / EdgeOS

Adding SSH keys to EdgeOS-based devices like Ubiquiti Edge Router X

Maybe, like me, you're tired of typing a password and prefer to disable password auth for ssh anyway. Maybe, like me, you want to point VS Code at your Edge Router and be able to read configs and things. Maybe, like me, you'll discover that VS Code's Remote-SSH extension doesn't support the ERX architecture and be mildy bummed, but still happy to have passwordless SSH (via ssh-agent) and know that no password will get some rando into your ERX.

Here's how.

Cribbed from the VyOS Login/User Management docs

Configuring SSH for less typing

@maratori
maratori / .golangci.yml
Last active May 22, 2024 12:59
Golden config for golangci-lint
# This code is licensed under the terms of the MIT license https://opensource.org/license/mit
# Copyright (c) 2021 Marat Reymers
## Golden config for golangci-lint v1.58.2
#
# This is the best config for golangci-lint based on my experience and opinion.
# It is very strict, but not extremely strict.
# Feel free to adapt and change it for your needs.
run:
@DzeryCZ
DzeryCZ / ReadingHelmResources.md
Last active May 10, 2024 08:22
Decoding Helm3 resources in secrets

Helm 3 is storing description of it's releases in secrets. You can simply find them via

$ kubectl get secrets
NAME                                                TYPE                                  DATA   AGE
sh.helm.release.v1.wordpress.v1                     helm.sh/release.v1                    1      1h

If you want to get more info about the secret, you can try to describe the secret

$ kubectl describe secret sh.helm.release.v1.wordpress.v1
#!/usr/bin/env python
"""Wrapper tool for writing aws credentials into profiles."""
import argparse
import configparser
import platform
import subprocess
from os import path
from shutil import which
parser = argparse.ArgumentParser(description='Wrapper script for aws-okta tool.')
@mosquito
mosquito / README.md
Last active May 24, 2024 17:00
Add doker-compose as a systemd unit

Docker compose as a systemd unit

Create file /etc/systemd/system/docker-compose@.service. SystemD calling binaries using an absolute path. In my case is prefixed by /usr/local/bin, you should use paths specific for your environment.

[Unit]
Description=%i service with docker compose
PartOf=docker.service
After=docker.service
@chrislovecnm
chrislovecnm / kops-iam-installer.txt
Created April 18, 2017 20:08
IAM roles for kops kubernetes installer
//All the resource "*" we can prune down to a
//"Resource": "arn:aws:iam::ACCOUNTNUMBER:role/ROLENAME"
// which is tied to a VPC
// This is a list of the permissions that our installer tools
// use.
// There are multiple modes that our installer uses, we
// will not need the perms for VPC creation as we
// will be using a pre installed VPC
// Will need all of these
@msbanik
msbanik / elasticsearch-with-typeahead-js-editted.markdown
Created August 20, 2016 17:21
ElasticSearch with Typeahead.js - editted
@ipbastola
ipbastola / clean-up-boot-partition-ubuntu.md
Last active May 22, 2024 19:07
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
@nrclark
nrclark / package.yml
Created May 5, 2016 20:57
Ansible playbook for provisioning a build server and building a package
---
- hosts: all
become: true
become_method: sudo
tasks:
- name: Update APT cache
apt: cache_valid_time=3600 update_cache=yes
- name: Upgrade installed packages
apt: upgrade=dist
@mikeatlas
mikeatlas / .golang-example-gitlab-ci.yml
Last active February 2, 2024 08:08
Example Go GitLab CI setup (no root/sudo required)
# See docs/examples
# http://doc.gitlab.com/ce/ci/quick_start/README.html
# http://doc.gitlab.com/ce/ci/yaml/README.html
# GitLab CI template for Go tests. Note this installs
# a new working copy of Go in a non-standard path such
# that sudo/root is not needed for the install stage.
# note that this particular install-environment stage
# is overly verbose in order to debug anything tricky