Skip to content

Instantly share code, notes, and snippets.

View mohlatif227's full-sized avatar

Altif mohlatif227

View GitHub Profile
@mohlatif227
mohlatif227 / README.md
Created May 11, 2022 13:20 — forked from vchrombie/README.md
automation script to setup the GrimoireLab project 🦉 🚀

glab-dev-env-setup

While setting up the developer environment of the GrimoireLab, one step is to fork all the GrimoireLab components, clone them to a target local folder (e.g., sources) and each local repo should have two remotes: origin points to the forked repo, while upstream points to the parent repo.

Reference: Cloning the repositories

This script automates the whole process.

@mohlatif227
mohlatif227 / GITCRASHCOURSE.MD
Created February 22, 2022 17:18 — forked from brandon1024/GITCRASHCOURSE.MD
Git Crash Course for Beginners

Git Crash Course for Beginners

Preface

A good understanding of Git is an incredibly valuable tool for anyone working amongst a group on a single project. At first, learning how to use Git will appear quite complicated and difficult to grasp, but it is actually quite simple and easy to understand.

Git is a version control system that allows multiple developers to contribute to a project simultaneously. It is a command-line application with a set of commands to manipulate commits and branches (explained below). This tutorial will help you get started, and in no time you will be a Git Ninja!

Contents:

@mohlatif227
mohlatif227 / importCert.sh
Created February 23, 2021 17:55 — forked from matthiassb/importCert.sh
Bash script for importing certificate chain into a JAVA truststore
#!/usr/bin/env bash
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
usage() {
echo "
-h [required] <hostname>
@mohlatif227
mohlatif227 / dns-sync.sh
Created February 23, 2021 12:58 — forked from matthiassb/dns-sync.sh
Init.d script for keeping WSL resolv.conf in-sync with Windows
#! /bin/bash
### BEGIN INIT INFO
# Provides: dns-sync
# Required-Start:
# Required-Stop:
# Default-Start: S
# Default-Stop:
# Short-Description: Synchronizes /etc/resolv.conf in WLS with Windows DNS - Matthias Brooks
### END INIT INFO
@mohlatif227
mohlatif227 / fix-wsl2-dns-resolution
Created February 23, 2021 11:31 — forked from coltenkrauter/fix-wsl2-dns-resolution
Fix DNS resolution in WSL2
More recent resolution:
1. cd ~/../../etc (go to etc folder in WSL).
2. echo "[network]" | sudo tee wsl.conf (Create wsl.conf file and add the first line).
3. echo "generateResolvConf = false" | sudo tee -a wsl.conf (Append wsl.conf the next line).
4. wsl --terminate Debian (Terminate WSL in Windows cmd, in case is Ubuntu not Debian).
5. cd ~/../../etc (go to etc folder in WSL).
6. sudo rm -Rf resolv.conf (Delete the resolv.conf file).
7. In windows cmd, ps or terminal with the vpn connected do: Get-NetIPInterface or ipconfig /all for get the dns primary and
secondary.
@mohlatif227
mohlatif227 / fix-wsl2-dns-resolution
Created February 23, 2021 11:31 — forked from coltenkrauter/fix-wsl2-dns-resolution
Fix DNS resolution in WSL2
More recent resolution:
1. cd ~/../../etc (go to etc folder in WSL).
2. echo "[network]" | sudo tee wsl.conf (Create wsl.conf file and add the first line).
3. echo "generateResolvConf = false" | sudo tee -a wsl.conf (Append wsl.conf the next line).
4. wsl --terminate Debian (Terminate WSL in Windows cmd, in case is Ubuntu not Debian).
5. cd ~/../../etc (go to etc folder in WSL).
6. sudo rm -Rf resolv.conf (Delete the resolv.conf file).
7. In windows cmd, ps or terminal with the vpn connected do: Get-NetIPInterface or ipconfig /all for get the dns primary and
secondary.
@mohlatif227
mohlatif227 / git.migrate
Created December 31, 2020 12:02 — forked from niksumeiko/git.migrate
Moving git repository and all its branches, tags to a new remote repository keeping commits history
#!/bin/bash
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
#
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
#
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.
@mohlatif227
mohlatif227 / Jenkinsfile
Created December 9, 2020 16:07 — forked from jonico/Jenkinsfile
Example for a full blown Jenkins pipeline script with multiple stages, kubernetes templates, shared volumes, input steps, injected credentials, heroku deploy, sonarqube and artifactory integration, Docker containers, multiple Git commit statuses, PR merge vs branch build detection, REST API calls to GitHub deployment API, stage timeouts, stage c…
#!groovy
import groovy.json.JsonOutput
import groovy.json.JsonSlurper
def label = "mypod-${UUID.randomUUID().toString()}"
podTemplate(label: label, yaml: """
spec:
containers:
- name: mvn
image: maven:3.3.9-jdk-8-alpine