Skip to content

Instantly share code, notes, and snippets.

@weshouman
weshouman / sublime_plugins.md
Created January 18, 2020 13:11
A list of useful plugins
@weshouman
weshouman / pins.md
Created December 14, 2019 10:17
some RJ hints

6 pin standards

The standard colors could be found here

  • RJ11 is a 6p2c schema (6 pin 2 conductors)
  • RJ14 is a 6p4c schema
  • RJ25 is a 6p6c schema
    The table for the different RJ pin layout could be found here

RJ45

  • RJ45S is 8p8c schema, follow the 8 pin schema
  • It has two different schemas T568A and T568B
@weshouman
weshouman / log_finder.md
Last active December 9, 2019 14:41
diff directory tree upon changes after executing a script

Sometimes we don't know which file exactly changed upon execution, usually it's something in the /var/log/ and may be in the tmp or even next to the application executable.

Method 1 - Size Differences

To handle such a situation, we may get the logical size (not physical size) of all the non-zero files then run the script.sh then get the new non-zero sizes and diff the outputs to get the specific files that got a change in size

TL;DR

@weshouman
weshouman / rpi_advanced.md
Last active April 26, 2021 05:55
Advanced RPI tips

Automated spawning of RPI images

  • We could use Vagrant to spawn an arm VM using this guide
  • The flow is like Vagrant -> Libvirt -> KVM -> QEMU -> Modified RPI image.
  • I remember finding an ansible book that modifies the RPI image for us, but I can't find it now ...

Mix Sound of Multi RPIs

To use a single speaker for multiple rpis, it would be tricky to search for that as Google will always redirect to multiple speakers a single rpi option.
Instead search for DAW mixer, here's a good list.
My understanding is that, the cheapest thing would be to utilize a whole SoC to mix between differen rpis and capture the sound output of this SoC. A [physical mixer](https://www.amazon.com/Rolls-MX42-Stereo-Mini-Mixer/dp/B00102ZN40/ref=sr_1_3?ots=1&slotNum=2&imprToken=bcb94584-e9de-a05d-6b7&tag=ars

@weshouman
weshouman / devops_tips.md
Created December 9, 2019 09:32
Devops tips and tricks

Vagrant

  • To run a GUI (no need for X) in a virtualbox, use vb.gui = true in the virtualbox section
  • To run a GUI (with X Windows Server) in a virtualbox, instead of just forwarding, follow this guide
@weshouman
weshouman / gitlab_logs.md
Last active December 7, 2019 13:58
Gitlab Logs

A trip into the logs of gitlab.

Structure

To understand which file to check and when, following is the structure tree of the logs

.
├── gitlab
│   ├── api_json.log
│   ├── application.log  ----------- (Headline of the performed tasks by gitlab)
│   ├── audit_json.log
@weshouman
weshouman / advanced_x_on_tty.md
Created December 5, 2019 21:14
Multi terminals on laptop

Answer is here

Steps are:

sudo X -quiet -nolisten tcp -noreset :4 vt8
DISPLAY=:4 virtualbox &

then ctrl+alt+f8 I recommend using the first command on a tty that isn't 7 (may be tty6) and the same for the other command on may be tty5.

@weshouman
weshouman / resources.md
Last active August 21, 2020 12:23
An overview of systemd
@weshouman
weshouman / openstack_study.md
Last active March 15, 2024 09:51
Openstack study topics

Rapid dive resource

  • Take a look at this list, it has the namings clearly stated within a multi-part guide for setting up openstack, alongside with the system requirements.

Component Documentation

General Introduction resources

For basic understanding of the functionality, following are some useful resources.

  • OpenStack's demo videos, is a good collection for different videos.
@weshouman
weshouman / ansible_advanced.md
Last active March 1, 2020 14:27
Debugging Ansible tips

Debugging Options

To debug (using print statements), one has 2 options

Debug the Module

  • The module files are located inside ansible/module_utils/module_name/ ie: ansible/module_utils/k8s/
  • The parameters given to a specific task are stored in the self.params
  • self.params gets the values assigned outside the module (from the Module System)
  • Adding any print statements, will result in the task failing, so after debugging ensure no prints are still existent

Debug the Module System