Skip to content

Instantly share code, notes, and snippets.

View yaliv's full-sized avatar
🪐
Better productivity and beyond

Muhammad Yahya Muhaimin yaliv

🪐
Better productivity and beyond
View GitHub Profile
"LD_* scout runtime" information:
{
"can-write-uinput" : true,
"steam-installation" : {
"path" : "/home/yahya/.local/share/Steam",
"data_path" : "/home/yahya/.local/share/Steam",
"bin32_path" : "/home/yahya/.local/share/Steam/ubuntu12_32",
"steamscript_path" : "/usr/lib/steam/steam",
"steamscript_version" : "1.0.0.78",
"issues" : [
@yaliv
yaliv / aesutil.go
Last active March 21, 2022 02:10
AES encryption + AAD
package aesutil
import (
"crypto/aes"
"crypto/cipher"
crypto_rand "crypto/rand"
"errors"
)
const (
@yaliv
yaliv / password.go
Created March 21, 2022 01:55
Random password generator
package password
import (
crypto_rand "crypto/rand"
"encoding/base64"
"math/big"
)
func genRandomPassword() (string, error) {
// Random length: 8-25 chars.
@yaliv
yaliv / store.go
Created March 21, 2022 01:34
Simple storage in a JSON file
package secretstore
import (
"encoding/json"
"errors"
"os"
)
type Secret struct {
ID int64 `json:"id"`
@yaliv
yaliv / jscvalidator_test.go
Last active November 8, 2020 16:06
Benchmark gojsonschema validation in parallel
package jscvalidator
import (
"testing"
"github.com/xeipuuv/gojsonschema"
)
const (
passwordSchema = `{
@yaliv
yaliv / lightdm.conf
Created August 27, 2019 04:03
LightDM configuration - Asus TUF Gaming FX505DU
#
# General configuration
#
# start-default-seat = True to always start one seat if none are defined in the configuration
# greeter-user = User to run greeter as
# minimum-display-number = Minimum display number to use for X servers
# minimum-vt = First VT to run displays on
# lock-memory = True to prevent memory from being paged to disk
# user-authority-in-system-dir = True if session authority should be in the system location
# guest-account-script = Script to be run to setup guest account
@yaliv
yaliv / display_setup.sh
Created August 27, 2019 03:57
LightDM display setup script - Asus TUF Gaming FX505DU
#!/bin/sh
xrandr --setprovideroutputsource radeon NVIDIA-0
xrandr --auto
@yaliv
yaliv / 90-mhwd.conf
Created August 27, 2019 03:48
Discrete card as primary GPU - Asus TUF Gaming FX505DU
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig: version 430.26
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0"
Inactive "Device1"
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
EndSection