Skip to content

Instantly share code, notes, and snippets.

View ddubson's full-sized avatar
🇺🇦

Dmitriy Dubson ddubson

🇺🇦
View GitHub Profile
@ddubson
ddubson / .editorconfig
Created June 11, 2020 23:19
C#/.NET .editorconfig
# Remove the line below if you want to inherit .editorconfig settings from higher directories
root = true
# C# files
[*.cs]
#### Core EditorConfig Options ####
# Indentation and spacing
indent_size = 4
@ddubson
ddubson / remove-multiple-apps-from-scoop-cache.ps1
Created March 29, 2020 16:12
Remove multiple apps from scoop cache
@("app-one", "app-two", "app-three") | ForEach-Object { scoop cache rm $_ }
@ddubson
ddubson / README-Template.md
Created January 6, 2020 21:08 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@ddubson
ddubson / jfrog-artifactory-docker.sh
Last active January 10, 2018 18:32
Setup JFrog Artifactory OSS locally with Docker
docker pull docker.bintray.io/jfrog/artifactory-oss:latest
docker run --name artifactory -d -p 8081:8081 docker.bintray.io/jfrog/artifactory-oss:latest
# With volume mounting
docker run
--name artifactory-oss
-d
-v /var/opt/jfrog/artifactory:/var/opt/jfrog/artifactory
-p 8081:8081 docker.bintray.io/jfrog/artifactory-oss:latest
@ddubson
ddubson / nmap.sh
Last active August 23, 2020 07:58
Nmap cheat sheet
# Default nmap scan
nmap localhost
# Default service nmap
nmap -sV localhost
# Service scan with output logging
nmap -sV -oA log.txt localhost
# Scan specific ports
nmap -p1-1024 localhost
# e.g. Check if local port 80 is open
nmap -p 80 localhost
@ddubson
ddubson / gist:4675b065eb19035f44769639c746293b
Last active May 3, 2016 17:37
Docker advanced commands
###
docker run -i --dns=8.8.8.8 --name=mycontainer1 -i ubuntu:latest
###
docker run -t --dns=8.8.8.8 --dns-search=mydomain.local --volume /local_vol --volume /home/user:/remote_vol --name=mycontainer3 -i ubuntu:latest /bin/bash
### Mnt volume hosting basic web template
docker run --name=webtest -v /home/ddubson/docker/dockerwww:/var/www/html -it centos6:baseweb /bin/bash
###
@ddubson
ddubson / gist:c7bde40dc25e2ea6a1a8
Created December 26, 2015 15:04
Docker Deep Dive - Lab #3
1. Create a directory in your 'user' home directory called 'docker'. Within that directory, create another directory called 'mydata'. Within that directory, create a file called 'mydata.txt' containing any text message you want.
# mkdir -p docker/mydata
# touch docker/mydata/mydata.txt
2. Create a docker container name 'local_vol' from the 'centos:6' image. The container should be created in interactive mode, attached to the current terminal and running the bash shell. Finally create the container with a volume (or directory) called 'containerdata' so that the system will automatically create the directory/mount when the container starts.
# docker create --name="local_vol" -t -i -v /containerdata centos:6 /bin/bash
3. List the filesystems within the container, specifically looking for the volume/directory that was added to the container during creation.
@ddubson
ddubson / gist:2217565de88de6d708d8
Last active December 26, 2015 04:06
Docker Deep Dive - Lab #2
1. Create a container from the base image for the latest version of Ubuntu available (if you do not have an Ubuntu base image installed locally, pull the latest one down for your local repository). The container should be started in interactive mode attached to the current terminal and running the bash shell. Once running, shut the container down by exiting.
# docker pull ubuntu
# docker run -t -i ubuntu:latest /bin/bash
# exit
2. Run the appropriate Docker command to get the name of the previously run container. Issue the appropriate command to restart the container that you obtained the name of. Do NOT create a new container, restart the one we just used.
## -l = latest
# docker ps -l