Skip to content

Instantly share code, notes, and snippets.

@joaopizani
joaopizani / .screenrc
Created May 17, 2012 11:55
A killer GNU Screen Config
# the following two lines give a two-line status, with the current window highlighted
hardstatus alwayslastline
hardstatus string '%{= kG}[%{G}%H%? %1`%?%{g}][%= %{= kw}%-w%{+b yk} %n*%t%?(%u)%? %{-}%+w %=%{g}][%{B}%m/%d %{W}%C%A%{g}]'
# huge scrollback buffer
defscrollback 5000
# no welcome message
startup_message off
@cjyar
cjyar / mbr-to-gpt-uefi.md
Last active May 11, 2024 09:42
Convert a disk from MBR to GPT+UEFI, in Linux.

Before starting, make sure you have a backup, and make sure to have a linux live boot ready to rescue your system. It's easy to mess this up!

  1. Use gdisk to convert the partition table to GPT.

    gdisk /dev/sda

  2. Create the "BIOS boot" partition that GRUB needs.

    n to create a new partition. Needs to be about 1MB. You can probably squeeze this in from sectors 34-2047. Use L or l to look up the code for "BIOS boot" (ef02).

  3. Write the new partition table.

    w

  4. Reload the partition table. > partprobe /dev/sda
@michaelbutler
michaelbutler / Witcher_3_Linux_Easy_README.md
Last active May 11, 2024 09:40
Install and Play The Witcher 3 Complete Edition (GOG & GOG Galaxy) on Ubuntu Linux 20.04 with Lutris.net and Wine

How to install and play The Witcher 3 (GOG Edition) on Linux

It's really quite simple!

Step 1: Buy The Witcher 3 on gog.com

Simply go to https://www.gog.com/game/the_witcher_3_wild_hunt_game_of_the_year_edition (this should also work with the regular edition) and buy and add the game to your library.

Do NOT click "Download and Install" at this point. We will do this through Lutris.

@c0psrul3
c0psrul3 / do_cloud-config.init.yaml
Last active May 11, 2024 09:40
Digital Ocean cloud-init / cloud-config / droplet metadata usage
#
#DO droplet metadata intro + for DO-API
# [https://www.digitalocean.com/community/tutorials/an-introduction-to-droplet-metadata#how-to-retrieve-droplet-metadata#digitalocean-api]
#
#intro to cloud-config scripting (source of following examples)
# [https://www.digitalocean.com/community/tutorials/an-introduction-to-cloud-config-scripting]
#
#howto
# [https://www.digitalocean.com/community/tutorials/how-to-use-cloud-config-for-your-initial-server-setup]
#
@akshayithape-devops
akshayithape-devops / EKS-monitoring-using-prometheus-and-grafana.md
Last active May 11, 2024 09:40
๐—ž8๐˜€ ๐—–๐—น๐˜‚๐˜€๐˜๐—ฒ๐—ฟ(EKS) ๐— ๐—ผ๐—ป๐—ถ๐˜๐—ผ๐—ฟ๐—ถ๐—ป๐—ด ๐˜‚๐˜€๐—ถ๐—ป๐—ด ๐—ฃ๐—ฟ๐—ผ๐—บ๐—ฒ๐˜๐—ต๐—ฒ๐˜‚๐˜€ ๐—ฎ๐—ป๐—ฑ ๐—š๐—ฟ๐—ฎ๐—ณ๐—ฎ๐—ป๐—ฎ

๐—ž8๐˜€ ๐—–๐—น๐˜‚๐˜€๐˜๐—ฒ๐—ฟ(EKS) ๐— ๐—ผ๐—ป๐—ถ๐˜๐—ผ๐—ฟ๐—ถ๐—ป๐—ด ๐˜‚๐˜€๐—ถ๐—ป๐—ด ๐—ฃ๐—ฟ๐—ผ๐—บ๐—ฒ๐˜๐—ต๐—ฒ๐˜‚๐˜€ ๐—ฎ๐—ป๐—ฑ ๐—š๐—ฟ๐—ฎ๐—ณ๐—ฎ๐—ป๐—ฎ

Prerequisites

  1. An AWS Account
  2. IAM credentials and programmatic access.
  3. AWS credentials that are set up locally with aws configure.
  4. Ubuntu 22.04 LTS

Steps

@llcawc
llcawc / angie.md
Last active May 11, 2024 09:39
ะกะตั€ะฒะตั€ Angie ะดะปั Ubuntu

ะะฐัั‚ั€ะพะนะบะฐ ัะตั€ะฒะตั€ะฐ Angie

ัะฟะตั€ะฒะฐ ะฝะฐัั‚ั€ะฐะธะฒะฐะตะผ Ubuntu ะธะปะธ Debian: ะฟะพะดะบะปัŽั‡ะตะฝะธะต ะบ ัะตั€ะฒะตั€ัƒ ั‡ะตั€ะตะท ั‚ะตั€ะผะธะฝะฐะป ั SSH c ะปะพะณะธะฝะพะผ ะพั‚ root

ssh root@ip_server

ะžะฑะฝะพะฒะปัะตั‚ ัะธัั‚ะตะผัƒ

@sutnistj
sutnistj / main.md
Last active May 11, 2024 09:38
Latinka

ะ—ั€ะพะฑะปะตะฝะพ ะทะฐ ะฟั€ะพั…ะฐะฝะฝัะผะธ.

ะะฑะตั‚ะบะฐ

ะšะธั€ะธะปะธั†ั ะ›ะฐั‚ะธะฝะธั†ั ะšะธั€ะธะปะธั†ั ะ›ะฐั‚ะธะฝะธั†ั ะšะธั€ะธะปะธั†ั ะ›ะฐั‚ะธะฝะธั†ั
ะ ะฐ A a ะฏ ั Ja ja
ะ‘ ะฑ B b
ะ’ ะฒ V v
ะ“ ะณ H h
@rjhowe
rjhowe / toolbox.sh
Created October 2, 2020 19:23
Example Toolbox script
#!/bin/bash
set -eo pipefail
trap cleanup EXIT
# Defaults
REGISTRY=registry.redhat.io
IMAGE=rhel8/support-tools
TOOLBOX_NAME=toolbox-"${USER}"
TOOLBOXRC="${HOME}"/.toolboxrc
@joyrexus
joyrexus / README.md
Last active May 11, 2024 09:34
Perl one-liners

Hi:

perl -e 'print "hello world!\n"'

A simple filter:

perl -ne 'print if /REGEX/'

Filter out blank lines (in place):