Skip to content

Instantly share code, notes, and snippets.

View gipsh's full-sized avatar
💭
Loading......

gipsh gipsh

💭
Loading......
View GitHub Profile
@gipsh
gipsh / threadpool-test.rb
Created July 25, 2019 19:07
concurrency thread pool
require 'concurrent-ruby'
$pool = Concurrent::FixedThreadPool.new(2)
$pool.post do
{your function or block}
end
@gipsh
gipsh / set-aws-env.sh
Created August 4, 2020 14:49
set aws credentials into environment
PROFILES=$(awk -F"\\\]|\\\[" '/^\[/{print $2}' ~/.aws/credentials)
select PROFILE in $PROFILES; do
export AWS_ACCESS_KEY_ID="$(aws configure get aws_access_key_id --profile $PROFILE)"
export AWS_SECRET_ACCESS_KEY="$(aws configure get aws_secret_access_key --profile $PROFILE)"
export AWS_DEFAULT_REGION="$(aws configure get region --profile $PROFILE)"
break
done
echo AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID
@gipsh
gipsh / ubuntu_on_asus_TUF_A15_FA506IV.MD
Last active March 4, 2025 17:00
Ubuntu 20.04 on ASUS TUF A15 (FA506IV)

Installed using lived cd

Needed to add the nomodeset option to grub to correctly boot

After boot edit /etc/default/grub and add the nomodeset to the line with GRUB_CMDLINE_LINUX_DEFAULT.

Run this to make it persistent:

@gipsh
gipsh / gist:7eef87a52f6f99447e5b4c21b616bac6
Created October 22, 2021 13:04
curl upload s3 bucket pre-signed url with metadata
curl -v -X PUT -H "x-amz-meta-uploader:blabla" -T {file.png} -L "{pre-signed-url}"