This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# We must update both the Python and NPM packages | |
pip install --upgrade aws-cdk-lib | |
npm install -g aws-cdk@latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Resolves the following error which occurs when Ruby does not like our GCC version: | |
# | |
# vm_core.h:1865:34: error: ‘ruby_current_ec’ undeclared (first use in this function) | |
# rb_execution_context_t *ec = ruby_current_ec; | |
# | |
# Install the Developer Toolset 7 package to obtain a more current version of GCC | |
sudo yum install centos-release-scl | |
sudo yum install devtoolset-7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo yum install gcc make zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel openssl11-devel tk-devel libffi-devel xz-devel | |
git clone https://github.com/pyenv/pyenv.git ~/.pyenv | |
CPPFLAGS=-I/usr/include/openssl11 LDFLAGS=-L/usr/lib64/openssl11 pyenv install 3.11 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo dd if=/dev/zero of=/swapfile count=2048 bs=1MiB | |
sudo chmod 600 /swapfile | |
sudo mkswap /swapfile | |
sudo swapon /swapfile | |
sudo vi /etc/fstab | |
/swapfile swap swap defaults 0 0 | |
sudo yum group install -y "Development Tools" | |
sudo yum install -y gcc-6 patch bzip2 openssl-devel libyaml-devel libffi-devel readline-devel zlib-devel gdbm-devel ncurses-devel wget libcurl-devel tmux vim |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
headers = %w(column1 column2 column3) | |
CSV.open('tmp/output.csv', 'wb') { |csv| csv << headers; MyModel.each { |app| csv << app.attributes.values_at(*headers) } } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# List all available formats and download specific audio-only format | |
youtube-dl -F https://www.youtube.com/watch?v=xFjpTF4-PgI | |
youtube-dl -f 140 https://www.youtube.com/watch?v=xFjpTF4-PgI | |
# Download and convert to audio-only format | |
youtube-dl -x --audio-format m4a https://www.youtube.com/watch?v=xFjpTF4-PgI |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[mysqld] | |
innodb_buffer_pool_size=1G # Default: 128M. Ideally, this is 80% of the available RAM | |
max_connections=301 # Default: 151. Increase for more concurrent connections if you have the resources. | |
query_cache_size=64M # Default: 0 | |
# Check configuration of custom variables above | |
show variables like 'innodb_buffer%'; | |
show variables like '%connections%'; | |
show variables like '%query_cache%'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a = ('A'..'Z').to_a + (1..9).to_a | |
5.times.map { 4.times.map { a.sample }.join }.join(' - ') | |
# "4H8Y - 3OQD - 9DO8 - 6WTW - KROI" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# NGINX from source | |
/opt/nginx/logs/*.log { | |
su nginx nginx | |
weekly | |
dateext | |
dateformat .%Y-%m-%d | |
rotate 3 | |
compress | |
delaycompress | |
create 0640 nginx nginx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
000000: actions | |
010000: status effects | |
020000: items | |
058000: fashions (small), bardings | |
059000: mount & minions (small) | |
060000: weather, map markers, market board, player markers, various icons | |
061000: event actions, markers, gods, pvp, custom deliveries, playstyles, various icons | |
062000: jobs, beast tribes, map stuff | |
063000: hunts, maps | |
064000: emotes, mount actions, roleplay actions |
NewerOlder