Skip to content

Instantly share code, notes, and snippets.

View mksvdmtr's full-sized avatar
💭
UNIX is very simple, it just needs a genius to understand its simplicity.

mksvdmtr

💭
UNIX is very simple, it just needs a genius to understand its simplicity.
View GitHub Profile
@onlurking
onlurking / dell-vostro-5490-sound-fix.md
Last active July 21, 2024 05:44
Dell Vostro 5490 Sound and Microphone Fix (Manjaro/Arch Linux)

Vostro 5490 Sound and Microphone Fix (Manjaro/Arch Linux)

Instal sof-firmware as described in Arch Linux Wiki:

sudo pacman -S sof-firmware

Configure PulseAudio to load Alsa modules with the correct device and channel settings, by adding these two lines to /etc/pulse/default.pa:

@ph20
ph20 / gist:183acf405386da62281d15b4c51ff08e
Last active June 4, 2023 09:08
Fixing absence gpg keys on Arch Linux
# try manualy update
sudo pacman -Sy archlinux-keyring
sudo pacman-key --refresh-keys
pacman-key --list-sigs | grep ImporteddKey
# recreate gpg database if previous wrong
ls -l /etc/pacman.d/gnupg
sudo mv /etc/pacman.d/gnupg /etc/pacman.d/gnupg.back
sudo pacman-key --init
sudo pacman-key --populate
@yougg
yougg / sftp.go
Created July 30, 2018 12:08
simple sftp get/put api in go
package sftp
import (
"errors"
"fmt"
"io"
"os"
"path/filepath"
"strings"
"time"
@superjose
superjose / .gitlab-ci.yml
Last active February 19, 2024 10:22
This is an example of a .gitlab-ci.yml that is required for Continuous Integration on GitLab projects.
# Reference: https://www.exclamationlabs.com/blog/continuous-deployment-to-npm-using-gitlab-ci/
# GitLab uses docker in the background, so we need to specify the
# image versions. This is useful because we're freely to use
# multiple node versions to work with it. They come from the docker
# repo.
# Uses NodeJS V 9.4.0
image: node:9.4.0
# And to cache them as well.
stage('Stage Name') {
steps {
build(job: 'pipeline.name', parameters: [string(name: 'DEPLOY_TO', value: "test")])
}
}
To create a new Device ID (and reset configuration) after cloning a VM with Syncthing, just remove the content of this folder:
- Unix-like: $HOME/.config/syncthing
- Mac: $HOME/Library/Application Support/Syncthing
- Windows XP: %AppData%/Syncthing
- Windows 7+: %LocalAppData%/Syncthing
@corna
corna / intelmetool -s
Last active January 21, 2022 02:09
Output of intelmetool on a Thinkpad X220T with coreboot and me_cleaner
❯ sudo ./intelmetool -s
Bad news, you have a `QM67 Express Chipset Family LPC Controller` so you have ME hardware on board and you can't control or disable it, continuing...
MEI was hidden on PCI, now unlocked
MEI found: [8086:1c3a] 6 Series/C200 Series Chipset Family MEI Controller #1
ME Status : 0x1e003052
ME Status 2 : 0x16320172
ME: FW Partition Table : OK
@fntlnz
fntlnz / self-signed-certificate-with-custom-ca.md
Last active April 23, 2025 14:10
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@kmjones1979
kmjones1979 / nginx.conf
Last active December 27, 2024 22:33
This is an example NGINX configuration for the blog: Performing A/B Testing with NGINX - This demonstrates split_clients based routing on an argument named token
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log info;
pid /var/run/nginx.pid;
events { worker_connections 1024; }
http {
default_type text/html;
log_format main '$remote_addr -> $request $status $body_bytes_sent bytes -> $upstream_addr';
access_log /var/log/nginx/access.log main;