Skip to content

Instantly share code, notes, and snippets.

View hmajid2301's full-sized avatar

Haseeb Majid hmajid2301

View GitHub Profile
@hmajid2301
hmajid2301 / docker-interface.sh
Created June 4, 2020 10:48
This how you can view traffic using WireShark in a Docker container. What we want to do is find the interface name on the host machine so WireShark can listen for traffic on that interface. Open Wireshark then in the example below look for the interf
docker exec -it <container_name> cat /sys/class/net/eth0/iflink
# 8
ip link | grep 8
# 8: veth0561247@if7: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-6726433a4ff3 state UP mode DEFAULT group default
@hmajid2301
hmajid2301 / .gitlab-ci.yml
Last active June 15, 2024 05:13
This is an example of how you can use docker-compose within Gitlab CI. Here I am running integration tests, where the tests themselves kill and start Docker containers. The `docker-compose.test.yml` starts up the container in which we will run our te
tests:integration:
stage: test
image: hmajid2301/dind-docker-compose
script:
- sh tests/run_integration_tests.sh;
after_script:
- docker-compose -f docker-compose.test.yml down
@hmajid2301
hmajid2301 / launch.json.json
Created March 29, 2020 22:24
VSCode Flask Debugger
{
"name": "Flask",
"cwd": "${workspaceRoot}",
"type": "python",
"request": "launch",
"module": "flask",
"env": {
"FLASK_APP": "app.py",
"FLASK_ENV": "development",
"FLASK_DEBUG": "1"
@hmajid2301
hmajid2301 / docker-compose
Created March 24, 2020 13:12
How can we setup a DNS resolver using docker; We can send DNS requests like so `dig -p 5053 @172.28.1.1`
version: "3"
services:
bind:
image: sameersbn/bind:latest
dns: 127.0.0.1
expose:
- 53/udp
- 53/tcp
ports:
@hmajid2301
hmajid2301 / cloudSettings
Last active April 2, 2021 12:17
Visual Studio Code Settings Sync Gist
{"lastUpload":"2021-04-02T12:17:30.242Z","extensionVersion":"v3.4.3"}
@hmajid2301
hmajid2301 / genymotion.sh
Last active December 29, 2018 10:32
Genymotion commands on Linux
# To list all (VirtualBox) VMs
VBoxManage list vms
# "Google Pixel - 8.0 - API 26 - 1080x1920" {66bd956b-2a51-40dc-a448-509840a43b9b}
# To launch an emulator
<path_to_genymotion_folder>/player --vm-name <VM Name> &
~/genymotion/player --vm-name "Google Pixel - 8.0 - API 26 - 1080x1920" &