Skip to content

Instantly share code, notes, and snippets.

View ryderstorm's full-sized avatar

Damien Storm ryderstorm

View GitHub Profile
@ryderstorm
ryderstorm / install_snap_on_arch_linux.md
Last active March 27, 2023 18:55
Installing snap on Arch

I got an error when following the instructions to install snap on Arch Linux from https://snapcraft.io/install/multipass/arch#install

└─> makepkg -si
==> Making package: snapd 2.58.3-1 (Mon 27 Mar 2023 10:28:32 AM EDT)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found snapd-2.58.3.tar.xz
==> Validating source files with sha256sums...
@ryderstorm
ryderstorm / limit_docker_resource_usage_on_linux.md
Last active September 16, 2024 09:03
Limiting docker resource usage on Linux

The Problem

Linux doesn't have a dedicated Docker application like Windows and OSX that allows you to easily place resource constraints on the docker daemon. So if you spin up a bunch of resource hungry containers, it'll slow your computer to a crawl and/or start a fire.

Observe the Problem

Uses the image from https://hub.docker.com/r/polinux/stress to see the issue in practice. Run these beforehand to see just how much CPU/RAM docker can take up, and then run them making the adjustments below to see how the docker containers get limited.

You'll want to install ctop and have it running to be able to monitor the container usage:

sudo wget https://github.com/bcicen/ctop/releases/download/v0.7.3/ctop-0.7.3-linux-amd64 -O /usr/local/bin/ctop
@ryderstorm
ryderstorm / .bash_colors
Created September 9, 2019 15:59
Method for easily adding colors to your bash script outputs.
#!/bin/bash
# Sets variables that can be used to add color to text in bash scripts.
# Must use "echo -e" or "printf" for colors to work
# Load this file in your bash scripts by including this line:
# source /path/to/this/file
#
# Example usage:
# echo -e "${BLUE}This is blue.${YELLOW}And this is yellow.${NC}And this is the defaul color."
@ryderstorm
ryderstorm / installing_rmagick_ubuntu_16.04.txt
Last active May 17, 2023 00:28
Installing rmagick gem on Ubuntu 16.04
# the instructions from here: https://stackoverflow.com/questions/3704919/installing-rmagick-on-ubuntu/31089915#31089915
# worked, but only after I added in line 8
sudo apt-get purge graphicsmagick graphicsmagick-dbg imagemagick-common imagemagick imagemagick-6.q16 libmagickcore-6-headers libmagickwand-dev graphicsmagick-libmagick-dev-compat
sudo apt-get autoremove
sudo apt-get install imagemagick libmagickwand-dev
sudo ln -s /usr/lib/x86_64-linux-gnu/ImageMagick-6.8.9/bin-Q16/Magick-config /usr/bin/Magick-config
export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig
gem install rmagick
Starting tests...
===========================================================================
unknown error: Chrome version must be >= 53.0.2785.0
(Driver info: chromedriver=2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e),platform=Linux 3.13.0-48-generic x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 248 milliseconds
Build info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:37:03'
System info: host: 'jenkins01.weaveup.com', ip: '54.197.1.254', os.name: 'Linux', os.arch: 'amd64', os.version: '3.13.0-48-generic', java.version: '1.7.0_101'
Driver info: org.openqa.selenium.chrome.ChromeDriver (org.openqa.selenium.WebDriverException) (Selenium::WebDriver::Error::UnknownError)

Keybase proof

I hereby claim:

  • I am ryderstorm on github.
  • I am ryderstorm (https://keybase.io/ryderstorm) on keybase.
  • I have a public key whose fingerprint is 173B 3DE3 1C72 DF86 332D 977E CF98 F21F 2257 2C63

To claim this, I am signing this object:

@import url(https://fonts.googleapis.com/css?family=Roboto:400,700,500,300);@import url(https://fonts.googleapis.com/css?family=Roboto+Mono:400,700,500,300);@-webkit-keyframes a{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes a{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes b{0%{opacity:1}50%{opacity:0}to{opacity:1}}@keyframes b{0%{opacity:1}50%{opacity:0}to{opacity:1}}[src$='blue.png']{background-image:url(data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjE4IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHdpZHRoPSIxOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDA5Njg4IiBkPSJNMTIgMkM2LjQ4IDIgMiA2LjQ4IDIgMTJzNC40OCAxMCAxMCAxMCAxMC00LjQ4IDEwLTEwUzE3LjUyIDIgMTIgMnptLTIgMTVsLTUtNSAxLjQxLTEuNDFMMTAgMTQuMTdsNy41OS03LjU5TDE5IDhsLTkgOXoiLz48L3N2Zz4=)}[src$='red.png']{background-image:url(data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjE4IiB2aWV3Qm94PSIwIDAg
@ryderstorm
ryderstorm / test_for_newsletter
Last active August 29, 2015 14:20
Test for Newsletter
## Example Newsletter Article##
This is a example of how to create an article for the Rural Reader Newsletter using [StackEdit.io](http://stackedit.io/editor) and Markdown.
StackEdit.io is an online editor that allows you to quickly create web documents. StackEdit.io provides a simple, easy interface for [Markdown](http://daringfireball.net/projects/markdown/), a document markup language used to create html from plain text.
The beauty of StackEdit.io is you don't have to learn much about Markdown at all. You can use it just like Microsoft Word:
1. Enter your text in the window on the left
2. Use the buttons at the top to format your text
3. Preview the completed page on the right
@ryderstorm
ryderstorm / gist:5254892
Last active December 15, 2015 11:39
Damien at work
almost always run in QA00, rarely runs in QA03
- Documentation of framework
- Manual test case examples to help get familiar with iSeries processes
- Explanation of folder structures
- Overview of XML environment files
-mainly use QA00, SOX and SPS
-others are for special cases, rarely used
- Explanation of driver script and related scripts that are called