Skip to content

Instantly share code, notes, and snippets.

View hotsen's full-sized avatar
💭
Pending

Alexander hoth hotsen

💭
Pending
View GitHub Profile
@hotsen
hotsen / install_awscliv2.sh
Created June 21, 2024 04:43 — forked from eggbean/install_awscliv2.sh
Script to install or update AWS CLI v2 on Linux/WSL (x86_64 and aarch64 supported). Can be used in ansible or bootstrap script.
#!/bin/bash
# AWS CLI v2 install/update script
# For v2 you either need to install manually
# or use a script like this
#
# For bash v5 >
#
# For auto-completion add `cli_auto_prompt = on` to config
# ..or add AWS_CLI_AUTO_PROMPT=on environment variable
@hotsen
hotsen / test.yml
Created May 15, 2024 04:49 — forked from ykpythemind/test.yml
GitHub Action + Rails test example
# .github/workflows/test.yml
name: test
on: [push]
env:
RUBY_VERSION: 2.7.2
NODE_VERSION: 14.15.5
RAILS_ENV: test
FROM ubuntu:latest
RUN apt-get install -y language-pack-ja-base language-pack-ja
update-locale LANG=ja_JP.UTF-8 LANGUAGE=”ja_JP:ja”
# for Java
ENV JAVA_HOME /usr/lib/jvm/java-8-oracle
RUN echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections && \
apt-get update && \
1. I see that most of your connections and queries are running on the master(writer) database instance itself without much load on the reader instance. You can consider dividing your workload such that read-only queries/workloads are directed to the reader instance, and only write queries are handled by your writer instance. This will help alleviate the large undo logs(RollbackSegmentHistoryListLength) due to long running queries and in itself this should mitigate a lot of the performance issues.
One way to achieve splitting of Reads and Writes is by making use of a third party software Proxy solution which can split reads and writes to the appropriate endpoints. Below are a few example software solutions which you can consider:
[+] ProxySQL - https://proxysql.com/
[+] Heimdall Data - https://www.heimdalldata.com/
2. If and where possible, try to split large transactions into multiple smaller transactions. This will again reduce the growth of the undo log which seems to be the main cause of t
@hotsen
hotsen / Dockerfile-Nginx
Created March 11, 2019 11:04 — forked from joekr/Dockerfile-Nginx
Kubernetes + Rails (NGINX & Unicorn) on GCE
# Set nginx base image
FROM nginx
# Copy custom configuration file from the current directory
COPY nginx.conf /etc/nginx/nginx.conf
@hotsen
hotsen / App.js
Last active May 26, 2018 13:58
Simple Firestore/State Subscription
// https://github.com/invertase/react-native-firebase/issues/568#issuecomment-389733298
import firebase from './Firebase';
const db = firebase.firestore();
db.collection("messages")
.where("chatId", "==", this.props.chatId)
.orderBy("createdAt", "desc")
.limit(5)
// Thanks to github/@megahertz - https://gist.github.com/megahertz/3aad3adafa0f7d212b81f5e371863637
import { Children } from "react"
import { Provider } from 'mobx-react/native';
import { ApolloProvider } from 'react-apollo';
const SPECIAL_REACT_KEYS = { children: true, key: true, ref: true };
export default class MobxRnnProvider extends Provider {
props: {
---
format_version: 1.1.0
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
trigger_map:
- push_branch: "*"
workflow: tests
workflows:
_tests_setup:
steps:
- activate-ssh-key: {}
@hotsen
hotsen / install.sh
Created February 8, 2018 13:17
Install Requirements for React Native Development
## Brew
#
# Install Brew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Make sure Brew has permissions
brew doctor
# Update Brew
---
format_version: 1.1.0
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
trigger_map:
- push_branch: "*"
workflow: tests
workflows:
_tests_setup:
steps:
- activate-ssh-key: {}