Skip to content

Instantly share code, notes, and snippets.

View ohidurbappy's full-sized avatar
🌻
GREETINGS!

Ohidur Rahman Bappy ohidurbappy

🌻
GREETINGS!
View GitHub Profile
@ohidurbappy
ohidurbappy / static-ip-ubuntu.md
Last active March 8, 2024 15:52
static ip on ubuntu server 2022

go to /etc/netplan

List the files and open the cloud init file, in my case it is 50-cloud-init.yaml

network:
    ethernets:
        eth0:
 dhcp4: false
@ohidurbappy
ohidurbappy / macapp.go
Created August 21, 2023 18:59 — forked from mholt/macapp.go
Distribute your Go program (or any single binary) as a native macOS application
// Package main is a sample macOS-app-bundling program to demonstrate how to
// automate the process described in this tutorial:
//
// https://medium.com/@mattholt/packaging-a-go-application-for-macos-f7084b00f6b5
//
// Bundling the .app is the first thing it does, and creating the DMG is the
// second. Making the DMG is optional, and is only done if you provide
// the template DMG file, which you have to create beforehand.
//
// Example use:
@ohidurbappy
ohidurbappy / freeradius-ubuntu.md
Created June 16, 2023 08:33
Setting up freeradius server on ubuntu

Installing

apt-get update
apt-get install freeradius -y

edit /etc/freeradius/clients.conf

@ohidurbappy
ohidurbappy / app.yaml
Created April 12, 2023 02:06 — forked from alukach/app.yaml
An example Github Actions for Python + Pipenv + Postgres + Pyright
# .github/workflows/app.yaml
name: My Python Project
on: push
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 10
services:
@ohidurbappy
ohidurbappy / docker-help.md
Created March 4, 2023 06:01 — forked from bradtraversy/docker-help.md
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

Install docker on Ubuntu 22.04

 curl -fsSL https://get.docker.com -o get-docker.sh
 sudo sh get-docker.sh

Add user to the docker group

@ohidurbappy
ohidurbappy / auto-mount-drive.md
Created February 7, 2023 02:24
Auto Mount Drive in Ubuntu Server 22.04 at Startup

1. Create the Mount Point

First, we need to create a directory which will be our mount point for a drive

sudo mkdir /media/USB1

2. Get Drive UUID and Type

@ohidurbappy
ohidurbappy / parent.html
Created December 25, 2022 17:09 — forked from kaku87/parent.html
javascript popup close callback event.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Popup Example</title>
</head>
<body>
<script>
function popupCallback(str){
alert("This is callback:" + str);
}
@ohidurbappy
ohidurbappy / container-network-access.md
Created December 12, 2022 17:16
Access one container from another container

If you have two or more running container, complete next steps:

docker network create myNetwork
docker network connect myNetwork web1
docker network connect myNetwork web2

Now you connect from web1 to web2 container or the other way round.

  1. For compiling the source code install essential packages. (If you haven't done this before)
sudo apt install wget build-essential checkinstall
sudo apt install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev 
sudo apt install zlib1g-dev
sudo apt install zlib1g zlib1g-dev libssl-dev libbz2-dev libsqlite3-dev
sudo apt-get install -y build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev python3-openssl git
sudo apt install libedit-dev libnss3-dev