Skip to content

Instantly share code, notes, and snippets.

View vjunior1981's full-sized avatar

Vitor Jr. vjunior1981

  • https://linklist.bio/vjunior1981
  • Pedro Osório, RS - Brasil
  • X @vjunior1981
View GitHub Profile
---
- name: "Playing with Ansible"
hosts: localhost
connection: local
become: true
tasks:
- name: Install nginx
apt:
name: nginx
@vjunior1981
vjunior1981 / aws-cli-examples.sh
Last active January 18, 2022 00:36
some aws cli examples
# describe instances getting only tag name and public dns
# useful for creating assh templates
aws ec2 describe-instances \
--region us-east-1 \
--filters "Name=tag:KubernetesCluster,Values=k8s.arvore.com.br" \
--query "Reservations[].Instances[].{Name: Tags[?Key == 'Name'].Value | [0], PubDNS: PublicDnsName}"
# describe instances, filter by state=running
# output only public ip address and public dns name
# and filter by region with output as text
@vjunior1981
vjunior1981 / .p10k.zsh
Last active August 19, 2021 11:11
SRE onboarding - bootstrap
# Generated by Powerlevel10k configuration wizard on 2021-08-19 at 11:06 UTC.
# Based on romkatv/powerlevel10k/config/p10k-classic.zsh, checksum 41849.
# Wizard options: nerdfont-complete + powerline, small icons, classic, unicode, darkest,
# 24h time, round separators, round heads, round tails, 2 lines, disconnected,
# left frame, sparse, many icons, fluent, instant_prompt=off.
# Type `p10k configure` to generate another config.
#
# Config for Powerlevel10k with classic powerline prompt style. Type `p10k configure` to generate
# your own config based on it.
#
@vjunior1981
vjunior1981 / win10-usb-installer-mac-step-by-step.sh
Last active April 17, 2021 16:45
All previous PROBLEMS SOLVED, we're using MS-DOS and Mac OS X terminal this is how to install Windows 10 20h2 from USB by creating a USB bootable drive on Mac OS X. This is a straight forward process and in this video I will address any common problems people have faced in the past. This covers how to download Windows 10 ISO file download, this …
https://www.youtube.com/watch?v=ZVW7FyIEoDQ
••••• Use these commands along with the video •••••
1: diskutil list
2: diskutil eraseDisk MS-DOS "WINDOWS10" MBR diskN
3: rsync -avh --progress --exclude=sources/install.wim /Volumes/CCCOMA_X64FRE_EN-US_DV9/ /Volumes/WINDOWS10
@vjunior1981
vjunior1981 / gist:42feac39828e0d6cd4c98d3e09c6cebb
Created August 31, 2020 12:00
Create Vagrant Windows Box
# source: https://huestones.co.uk/2015/08/creating-a-windows-10-base-box-for-vagrant-with-virtualbox/
1. Create the virtual machine
Disk Space: Choose a virtual hard disk (VDI) dynamically allocated and choose a high upper limit for the size. The default max-size is pretty low (32GB!).
Memory: Choose a lowish value here. I chose 2048MB, but 1024MB would do as well.
CPU: Leave this at the default of 1.
note: copied from SuperUser:
For older versions of OSX, see this thread on forums.macosxhints.com.
Credit goes to dblu for explaining the use of plutil, ZILjr for introducing the wait4path command, and ekl for simplifying the whole thing by eliminating the need for an intermediate shell script.
Complete solution:
1. Open Terminal and make a backup copy of Apple's default dynamic_pager.plist:
@vjunior1981
vjunior1981 / gnome-shell
Last active September 23, 2019 16:39
Debug gnome extensions
sudo journalctl -f /usr/bin/gnome-shell

Keybase proof

I hereby claim:

  • I am vjunior1981 on github.
  • I am vitorjr81 (https://keybase.io/vitorjr81) on keybase.
  • I have a public key ASD2hJHG0HJegAfhmfkY_bC3khQSurenMuqzpy-vKvgXFwo

To claim this, I am signing this object:

@vjunior1981
vjunior1981 / init.toml
Created April 20, 2019 06:12
spacevim init.toml
#=============================================================================
# dark_powered.toml --- dark powered configuration example for SpaceVim
# Copyright (c) 2016-2017 Wang Shidong & Contributors
# Author: Wang Shidong < wsdjeg at 163.com >
# URL: https://spacevim.org
# License: GPLv3
#=============================================================================
# All SpaceVim option below [option] section
[options]
@vjunior1981
vjunior1981 / install.spacevim.sh
Last active April 20, 2019 06:43
install space vim
#! /usr/bin/env bash
curl -sLf https://spacevim.org/install.sh | bash