Skip to content

Instantly share code, notes, and snippets.

@redtripleAAA
redtripleAAA / Ubuntu-Workloader.Dockerfile
Last active September 18, 2022 04:05
Dockerfile Template for Workloader
#################################################
# The following .dockerfile can be used as a docker image for the following repo # https://github.com/brian1917/workloader
# Published Docker image can be used from Dockerhub # ansred/ubuntu-workloader-ssh # https://hub.docker.com/repository/docker/ansred/ubuntu-workloader-ssh
# This docker file will use Ubuntu AMD64 image and install all utility packages, inlcuding OpenSSH Server to access to the server # user= testuser # password=testpassword and port exposed 22
# You can build this dockerfile (Make sure to change credentials used for OpenSSH
# Make sure to edit pce.yaml as well with your Workloader information of simply used pce-add command
# Tip # You can use to test the dockerhub test image # https://labs.play-with-docker.com/
# Just run # "docker run -d -p 2022:22 --name workloader-ssh ansred/ubuntu-workloader-ssh"
# Note this flag if you wish delete the container when it stops --rm "docker run --rm -d -p 2022:22 --name workloader-ssh ansred/ubuntu-work
@redtripleAAA
redtripleAAA / gist:a6a5733e1b8322722572f782529c8c66
Created April 8, 2021 01:51
Docker Compose - WordPress - Synology NAS
version: '2.1'
services:
wordpress:
user: root
image: wordpress
restart: unless-stopped
ports:
- 6980:80
@redtripleAAA
redtripleAAA / docker_wordpress.md
Created May 27, 2020 07:39 — forked from bradtraversy/docker_wordpress.md
Docker Compose FIle For Wordpress, MySQL & phpmyadmin

Wordpress & Docker

This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command

$ docker-compose up -d

# To Tear Down
$ docker-compose down --volumes
@redtripleAAA
redtripleAAA / Code snippet from MainActivity.java
Created February 8, 2018 05:50 — forked from udacityandroid/Code snippet from MainActivity.java
Android for Beginners : Negative Number of Cups of Coffee Extra Challenge Solution
/**
* This method is called when the plus button is clicked.
*/
public void increment(View view) {
if (quantity == 100) {
// Show an error message as a toast
Toast.makeText(this, "You cannot have more than 100 coffees", Toast.LENGTH_SHORT).show();
// Exit this method early because there's nothing left to do
return;
}
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:paddingTop="0dp"
android:paddingBottom="16dp"
android:orientation="vertical">
@redtripleAAA
redtripleAAA / gist:dff5f7376f0ee9b3e70e9bab20c72428
Created January 27, 2018 06:24
Quiz 10 - Udacity - List Item with RelativeLayout
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<ImageView
android:id="@+id/ocean_image_view"
android:layout_width="56dp"
android:layout_height="56dp"
@redtripleAAA
redtripleAAA / gist:a36e9779e608ae6dd5430d07ff7e8f54
Created January 27, 2018 06:15
Quiz 9 - Lesson 3 - Relative to other views - Udacity
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/lyla_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
@redtripleAAA
redtripleAAA / activity_main.xml
Created January 27, 2018 02:45 — forked from anonymous/activity_main.xml
RelativeLayout XML for Udacity quiz question
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="16dp">
<TextView
android:text="I’m in this corner"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
@redtripleAAA
redtripleAAA / gist:02eaf105694d38114a13e4bd9e6a132b
Created January 27, 2018 02:08
Linear Layout - Layout Weight
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:src="@drawable/ocean"
android:layout_width="match_parent"
android:layout_height="wrap_content"