Skip to content

Instantly share code, notes, and snippets.

View beka's full-sized avatar

beka

View GitHub Profile
@beka
beka / buildspec.yml
Last active October 6, 2023 19:23
buildspec.yml file for AWS CodeBuild that builds AWS Lambda (Go) and uploads to the specified S3 bucket
version: 0.2
env:
variables:
S3_BUCKET: bucket-name
PACKAGE: package-name
MAINFILE: main.go
phases:
install:
Fedora
Create the /usr/lib/modprobe.d/blacklist-nouveau.conf file and add the following information to the file.
blacklist nouveau
options nouveau modeset=0
Re-generate initramfs.
$sudo dracut --force
noibrs noibpb nopti nospectre_v2 nospectre_v1 l1tf=off nospec_store_bypass_disable no_stf_barrier mds=off tsx=on tsx_async_abort=off mitigations=off
sudo fallocate -l 1G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
free -m
#first let's migrate system to working CentOS 8 repos, we need to install "centos-release-stream" package
sudo sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sudo sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
yum update
#Now we can migrate
@beka
beka / centos7_kernel_update.md
Created December 18, 2021 11:11 — forked from pgporada/centos7_kernel_update.md
Upgrade Kernel on Centos7 via ELRepo
Install the ELRepo and GPG key
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
yum install -y http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
Enable kernel updates from elrepo
yum-config-manager --enable elrepo-kernel
@beka
beka / mount_qcow2.md
Created December 16, 2021 17:22 — forked from shamil/mount_qcow2.md
How to mount a qcow2 disk image

How to mount a qcow2 disk image

This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.

Step 1 - Enable NBD on the Host

modprobe nbd max_part=8
### Keybase proof
I hereby claim:
* I am beka on github.
* I am beckonlisp (https://keybase.io/beckonlisp) on keybase.
* I have a public key ASCvc_S1w2BexIkhRDFlQa-DXEetp2UiENW4UqFBBJGdwQo
To claim this, I am signing this object:
@beka
beka / OCaml
Created October 11, 2011 19:08
Yet another "hello world"
let hello () =
Dom.window#alert "Hello, World"
;;
Dom.window#_set_onload hello
#!/usr/bin/python
from BeautifulSoup import BeautifulSoup as Soup
import os, urllib, urlparse
index = 'http://dl.dropbox.com/u/10497693/Library/Computer Science/'
def get(url):
print "getting %s" % url
return urllib.urlopen(url).read()