Skip to content

Instantly share code, notes, and snippets.

@sapiderman
sapiderman / app.py
Created August 10, 2023 12:32
Python Mock Server
from flask import Flask, request
import logging
import datetime
app = Flask(__name__)
# Configure logging
logging.basicConfig(level=logging.DEBUG)
@sapiderman
sapiderman / Validation_table
Last active December 12, 2020 16:16
List tools untuk validasi yaml
| service | tool | link |
| :--------: |:---------: | :-------------------------------------------------: |
| azure | IDE Plugin | https://marketplace.visualstudio.com/items?itemName=ms-azure-devops.azure-pipelines |
| bitbucket | web | <https://bitbucket-pipelines.atlassian.io/validator> |
| gitlab | web | <https://docs.gitlab.com/ee/ci/lint.html> |
| github | Web plugin | https://github.com/marketplace |
@sapiderman
sapiderman / azure_pipeline.yml
Last active December 11, 2020 05:34
Refer to a template from a different repository
trigger:
branches:
include:
- '*'
pool:
vmImage: 'ubuntu-latest'
resources:
repositories:
@sapiderman
sapiderman / azure_pipeline.yml
Created December 11, 2020 05:20
Templatized pipeline
trigger:
branches:
include:
- '*'
pool:
vmImage: 'ubuntu-latest'
jobs:
- job: pull_request_jobs
@sapiderman
sapiderman / azure_pipeline.yml
Last active December 12, 2020 13:33
Typical pipeline
name: $(Build.DefinitionName) - $(Date:ddMMyyy) Build $(BuildID)
trigger:
branches:
include:
- master
tags:
include:
- '*-STAGING*'
- '*-RELEASE*'
@sapiderman
sapiderman / gist_MigrateRepository.txt
Last active May 28, 2020 04:19
Migrate Repositories
When you want to migrate repositories from one service (saay some server) to a new service (maybe github).
It's actually pretty simple if you clone first to your local machine, then push to the new repository both using the
--mirror switch in git clone and push.
1. clone old repo to local
git clone --mirror username@host:somedir/myRepo.git
2.create a new empty repository in the new service (ie: github).
Get the new location: example: github.com/myname/newproject.