Skip to content

Instantly share code, notes, and snippets.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tuksik
tuksik / docker-on-android.md
Created April 8, 2020 22:33 — forked from arno01/docker-on-android.md
Docker on Android

WORK IN PROGRESS

Docker on Android

Setup:

Samsung Galaxy Tab S5e SM-T720
Android Pie on Linux 4.9.112 (not rooted)
Termux
ssh_authorized_keys:
- github:tuksik
hostname: k3osm
k3os:
dns_nameservers:
- 8.8.8.8
- 1.1.1.1
ntp_servers:
- 0.us.pool.ntp.org
- 1.us.pool.ntp.org
@tuksik
tuksik / add-vagrant.sh
Last active January 5, 2020 18:44
Add Vagrant user in k3os
sudo adduser --disabled-password --gecos \"\" vagrant
echo vagrant:vagrant | sudo chpasswd
sudo mkdir -p /home/vagrant/.ssh
sudo chmod 0700 /home/vagrant/.ssh
sudo wget --no-check-certificate https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub -O /home/vagrant/.ssh/authorized_keys
sudo chmod 0600 /home/vagrant/.ssh/authorized_keys
sudo chown -R vagrant /home/vagrant/.ssh
sudo echo 'vagrant ALL=(ALL:ALL) ALL' >> /etc/sudoers
sudo mkdir -p /home/rancher/.ssh
sudo chmod 0700 /home/rancher/.ssh
@tuksik
tuksik / K3os-packer-vagrant-virtualbox.md
Created January 2, 2020 14:56 — forked from mak3r/K3os-packer-vagrant-virtualbox.md
Build and run k3os using packer, vagrant and virtualbox

Packer and Vagrant resources to build k3os in VirtualBox

Requirements

  • packer
  • vagrant
  • virtualbox

Build and Run

  1. packer build k3os.json
  2. vagrant up
@tuksik
tuksik / Ansible-Vault how-to.md
Created October 1, 2019 09:56 — forked from tristanfisher/Ansible-Vault how-to.md
A short tutorial on how to use Vault in your Ansible workflow. Ansible-vault allows you to more safely store sensitive information in a source code repository or on disk.

Working with ansible-vault


I've been using a lot of Ansible lately and while almost everything has been great, finding a clean way to implement ansible-vault wasn't immediately apparent.

What I decided on was the following: put your secret information into a vars file, reference that vars file from your task, and encrypt the whole vars file using ansible-vault encrypt.

Let's use an example: You're writing an Ansible role and want to encrypt the spoiler for the movie Aliens.

@tuksik
tuksik / gist:722036bbf656374772caf84f386db942
Created March 13, 2019 20:14 — forked from juanje/gist:3797297
Mount apt cache of a Vagrant box in the host to spin up the packages installation

This is a little trick I use to spin up the packages instalation on Debian/Ubuntu boxes in Vagrant.

I add a simple function that checks if a directory named something similar to ~/.vagrant.d/cache/apt/opscode-ubuntu-12.04/partial (it may have another path in Windows or MacOS) and create the directory if it doesn't already exist.

def local_cache(basebox_name)
  cache_dir = Vagrant::Environment.new.home_path.join('cache', 'apt', basebox_name)
  partial_dir = cache_dir.join('partial')
  partial_dir.mkdir unless partial_dir.exist?
 cache_dir
@tuksik
tuksik / 14-aws.sh
Last active December 23, 2018 11:53 — forked from vfarcic/14-aws.sh
cd k8s-specs
git pull
export AWS_ACCESS_KEY_ID=[...]
export AWS_SECRET_ACCESS_KEY=[...]
aws --version
@tuksik
tuksik / make-website.sh
Created January 21, 2018 17:41 — forked from tomfuertes/make-website.sh
create an s3 bucket, config website serving, create cloudfront distribution, sync local dir
#!/usr/bin/env bash
# To run:
# $ brew uninstall s3cmd && brew install s3cmd --HEAD
# $ s3cmd --configure # fill in w/ amazon account vars
# $ cd path/to/local/static/site
# $ wget https://gist.githubusercontent.com/tomfuertes/9175005/raw/make-website.sh
# $ bash make-website.sh
#
# NOTE: cfcreate takes ~15 minutes to run on AWS.
@tuksik
tuksik / Win7-boxstarter-script-work
Last active December 28, 2017 14:45 — forked from mikemoate/boxstarter-script-work
Boxstarter script to rebuild work machine, tested with Windows 7
# Bootstrap script for use with http://boxstarter.org/
# To use append the URL to the raw snippet to http://boxstarter.org/package/nr/url?
# (e.g. http://boxstarter.org/package/nr/url?https://gist.githubusercontent.com/mikemoate/0915288fff447b640cdb/raw/83b32099ea8f21d06604ae70003312b7492b8cd8/boxstarter-script-work)
# NOTE: You may see errors from some packages if you have already installed the software before using boxstarter.
# (some MSI's handle this badly and so exit with the wrong code, I've seen this for HipChat, RoyalTS, Virtualbox and Vagrant)
# Windows settings
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions -EnableShowFullPathInTitleBar
Set-TaskbarOptions -Size Small -Lock -Dock Bottom