Skip to content

Instantly share code, notes, and snippets.

@hy37id
hy37id / oh-my-zsh-powerlevel9k-theme.md
Created May 5, 2021 12:48 — forked from android10/oh-my-zsh-powerlevel9k-theme.md
oh-my-zsh with PowerLevel9k on Arch Linux

Attention: This is DEPRECATED in favor of PowerLevel10K, I wrote an article about it:

Install oh-my-zsh with powerlevel9k theme on Arch Linux

This gist aims to facilitate the switching from bash to zsh as our defaut shell. We will be using oh-my-zsh with the powerful theme: Powerlevel9k. You will find all the links below. This process applies mainly for Arch Linux, but can be setup for any other distro (in theory :)). I'm also using Gnome Terminal and pacaur as package manager.

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by
@hy37id
hy37id / arch-uefi-luks-installation.txt
Created April 29, 2021 06:46 — forked from jkauppinen/arch-uefi-luks-installation.txt
Arch linux installation with full disk encryption via dm-crypt + LUKS
# This installation guide will create basic working arch linux installation with encryption.
# Encryption is implemented with dm-crypt + LUKS on a single disk.
# Following articles/posts/gists were used as reference
# https://www.happyassassin.net/2014/01/25/uefi-boot-how-does-that-actually-work-then/
# https://wiki.archlinux.org/index.php/Installation_guide
# https://wiki.archlinux.org/index.php/Dm-crypt/System_configuration
# https://wiki.archlinux.org/index.php/Dm-crypt/Device_encryption
# https://blog.tinned-software.net/automount-a-luks-encrypted-volume-on-system-start/
# https://gist.github.com/mattiaslundberg/8620837
@hy37id
hy37id / install-arch.md
Created April 29, 2021 06:46 — forked from mjnaderi/install-arch.md
Install Arch Linux with Full Disk Encryption (LVM on LUKS)
@hy37id
hy37id / full-disk-encryption-arch-uefi.md
Created April 28, 2021 09:46 — forked from huntrar/full-disk-encryption-arch-uefi.md
Arch Linux Full-Disk Encryption Installation Guide [Encrypted Boot, UEFI, NVMe, Evil Maid]

Arch Linux Full-Disk Encryption Installation Guide

This guide provides instructions for an Arch Linux installation featuring full-disk encryption via LVM on LUKS and an encrypted boot partition (GRUB) for UEFI systems.

Following the main installation are further instructions to harden against Evil Maid attacks via UEFI Secure Boot custom key enrollment and self-signed kernel and bootloader.

Preface

You will find most of this information pulled from the Arch Wiki and other resources linked thereof.

Note: The system was installed on an NVMe SSD, substitute /dev/nvme0nX with /dev/sdX or your device as needed.

@hy37id
hy37id / vmware-template.centos7.sh
Created March 16, 2020 12:13 — forked from efeldhusen/vmware-template.centos7.sh
Bash script for Centos 7.x VMware Template Images
#!/bin/bash
#Paths are for Centos 7.x
# Install optional packages
/usr/bin/yum install -y epel-release
/usr/bin/yum install -y bash-completion htop yum-utils dkms open-vm-tools
#stop logging services
/sbin/service rsyslog stop
/sbin/service auditd stop
@hy37id
hy37id / Flexible Dockerized Phoenix Deployments.md
Created July 15, 2018 21:49 — forked from jswny/Flexible Dockerized Phoenix Deployments.md
A guide to building and running zero-dependency Phoenix (Elixir) deployments with Docker. Works with Phoenix 1.2 and 1.3.

Prelude

I. Preface and Motivation

This guide was written because I don't particularly enjoy deploying Phoenix (or Elixir for that matter) applications. It's not easy. Primarily, I don't have a lot of money to spend on a nice, fancy VPS so compiling my Phoenix apps on my VPS often isn't an option. For that, we have Distillery releases. However, that requires me to either have a separate server for staging to use as a build server, or to keep a particular version of Erlang installed on my VPS, neither of which sound like great options to me and they all have the possibilities of version mismatches with ERTS. In addition to all this, theres a whole lot of configuration which needs to be done to setup a Phoenix app for deployment, and it's hard to remember.

For that reason, I wanted to use Docker so that all of my deployments would be automated and reproducable. In addition, Docker would allow me to have reproducable builds for my releases. I could build my releases on any machine that I wanted in a contai

# Version 1.2 :: This script reads offline event logs, oldest to newest, bottom to top.
# See http://www.trimideas.com/2015/04/auditing-changed-deleted-files.html for instructions.
$LogPath = "C:\Event_Logs\"
$ReportPath = "C:\Audit\File-Audit-Reports\"
$Formatted_Date = (Get-Date -UFormat %A-%B-%d-at-%I-%M-%S%p)
$ZipName = "Security-Events-for-" + (Get-Date -UFormat %A-%B-%d) + ".zip"
$Report_in_CSV = $ReportPath + "Audit of changed files on " + $Formatted_Date + ".csv"
$Truncated_Log_Path = $LogPath + "Archive-Security_on_" + $Formatted_Date + ".evtx"
$Today_Midnight = (Get-Date -Hour 0 -Minute 0 -Second 0)
@hy37id
hy37id / youtube-dl-download-pluralsight.md
Created May 16, 2017 07:17 — forked from munim/youtube-dl-download-pluralsight.md
youtube-dl to download pluralsight videos

Download Plural Sight videos

Software required:

youtube-dl

After installation and putting the youtube-dl in PATH

youtube-dl \
@hy37id
hy37id / vim_cheatsheet.md
Created August 17, 2016 09:59 — forked from awidegreen/vim_cheatsheet.md
Vim shortcuts

Introduction

  • C-a == Ctrl-a
  • M-a == Alt-a

General

:q        close
:w        write/saves
:wa[!]    write/save all windows [force]
:wq       write/save and close