Skip to content

Instantly share code, notes, and snippets.

View iamcaleberic's full-sized avatar
🤖
I'm not a teapot

Eric Caleb iamcaleberic

🤖
I'm not a teapot
View GitHub Profile
@iamcaleberic
iamcaleberic / aurora.md
Created July 5, 2019 17:18
Reducing or increasing instance size on Amazon Aurora RDS
  • Select aurora cluster
  • Create a reader making sure all the options are correct and they are in the same db parameter group
  • Make sure the reader completes setup and the replica lag is withing acceptable range 13 - 20 ms
  • Set the highest failover priority for the reader after its completely setup usually failover-0
  • Make sure there are no pending changes
  • Select writer and select failover and accept prompts
  • Wait for the failover process to complete (30 - 60 seconds)
  • You should have the reader promoted to a writer

Reference:

@iamcaleberic
iamcaleberic / node-sass.md
Created July 22, 2018 13:28
Compiling node sass with full cpu resources
  • Compile node-sass for your current platform
          git clone --recursive https://github.com/sass/node-sass.git
         cd node-sass
          npm install
          JOBS=max node scripts/build -f
      
    
@iamcaleberic
iamcaleberic / status.rb
Created March 26, 2018 13:46
Rack HTTP status codes
# Every standard HTTP code mapped to the appropriate message.
# Generated with:
# curl -s https://www.iana.org/assignments/http-status-codes/http-status-codes-1.csv | \
# ruby -ne 'm = /^(\d{3}),(?!Unassigned|\(Unused\))([^,]+)/.match($_) and \
# puts "#{m[1]} => \x27#{m[2].strip}\x27,"'
HTTP_STATUS_CODES = {
100 => 'Continue',
101 => 'Switching Protocols',
102 => 'Processing',
@iamcaleberic
iamcaleberic / blacklist.md
Last active February 19, 2018 12:49
Blacklisting a kernel module

Blacklisting a kernel module

  • Some modules are loaded as part of the initramfs. mkinitcpio -M will print out all automatically detected modules: to prevent the initramfs from loading some of those modules, blacklist them in /etc/modprobe.d/modprobe.conf

  • Running mkinitcpio -v will list all modules pulled in by the various hooks:

mkinitcpio -v

@iamcaleberic
iamcaleberic / rm.md
Last active February 12, 2018 18:41
Docker deleting all containers and/or images

Docker deleting all containers and/or images

Warning: This will destroy all your images and containers. It will not be possible to restore them!

Deleting all containers

docker rm $(docker ps -a -q)

Deleting all images

docker rmi $(docker images -q)

script

@iamcaleberic
iamcaleberic / freshdesk-sdk.md
Last active May 28, 2018 07:23
Fixing Freshdesk SDK node-sass Issues on Arch Linux and Other Distros
  • Compile node-sass for your current platform

          git clone --recursive https://github.com/sass/node-sass.git
         cd node-sass
          npm install
          JOBS=max node scripts/build -f
      
    
  • Do a recursive copy of your compile binary to frsh-dsk/node_modules

@iamcaleberic
iamcaleberic / pulse.md
Last active November 26, 2023 05:43
Enabling Pulse Audio Equaliser Arch Linux

Enabling Pulse Audio Equaliser Arch Linux

  • Install the pulseaudio package.

     $ pacman -S pulseaudio
    
  • Install control module and equlizer

     $ pacman -S pulseaudio-equalizer pavucontrol
    
  • Install gst-plugins-good if your intended program has a legacy GStreamer implementation.

  • STEAM_RUNTIME_PREFER_HOST_LIBRARIES=0 STEAM_RUNTIME=1 steam-runtime
Alien Isolation
  • Set startup options to
@iamcaleberic
iamcaleberic / arrayfire.md
Last active May 13, 2017 13:22
This is a bit of a hack when your default gcc is greater than 6.0.0 and you are compiling arrayfire from source on Arch

So when building arrayfire on Arch you kind of run into the error below if the default gcc version is more than 6.0.0

Make Error: NVCC does not support GCC version 6.0 or greater.

So here is a hack that might help you fix that particular snag.

  • Make sure you intall an alternate version of gcc that is < 6 but > 4.3 in this case gcc-5

  • Make sure you are in the arrayfire directory

@iamcaleberic
iamcaleberic / bazel.md
Last active May 12, 2017 09:46
Building bazel on Arch
  • Ensure that you have OpenJDK 8 installed on your system.

    • You can check this by running

            which javac 
      
  • if output is which: no javac Install OpenJDK 8 by running the command