Skip to content

Instantly share code, notes, and snippets.

@kamal2222ahmed
kamal2222ahmed / README.md
Created February 3, 2023 11:07 — forked from afunTW/README.md
sample code for icalendar and google calendar API

Intro

Thers's some MS-defined column in .ics that will be ignored when import .ics to google calendar. We can self modified those value and insert/update the google calendar by google calendar API.

  • icalendar: parse the .ics file
  • google-api-python-client: google calendar API

Usage

@kamal2222ahmed
kamal2222ahmed / TESTPLAN-SSO-V3.jmx
Created December 30, 2021 20:51
TESTPLAN-SSO-V3.jmx
<?xml version="1.0" encoding="UTF-8"?>
<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.4.1">
<hashTree>
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="AAVI-SSO-V2" enabled="true">
<stringProp name="TestPlan.comments">This test plan was created by the BlazeMeter converter v.3.0.20. Please contact [email protected] for further support.</stringProp>
<boolProp name="TestPlan.functional_mode">false</boolProp>
<boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
<elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" enabled="true">
<collectionProp name="Arguments.arguments"/>
</elementProp>
Status: Downloaded newer image for capitalone/hygieia-ui:latest
Creating mongodb ... done
Creating hygieia-api ... done
Creating hygieia-github ... done
Creating hygieia-ui ... done
Attaching to mongodb, hygieia-api, hygieia-github, hygieia-ui
mongodb | Error parsing command line: unrecognised option '--smallfiles'
mongodb | try 'mongod --help' for more information
hygieia-github | /bin/sh: 1: /hygieia/properties-builder.sh: Permission denied
hygieia-api | SPRING_DATA_MONGODB_HOST: mongodb
$ docker-compose logs
Attaching to hygieia-github, hygieia-ui, hygieia-api, mongodb
hygieia-github | /bin/sh: 1: /hygieia/properties-builder.sh: Permission denied
hygieia-api | SPRING_DATA_MONGODB_HOST: mongodb
hygieia-api | SPRING_DATA_MONGODB_PORT: 27017
hygieia-api |
hygieia-api | . ____ _ __ _ _
hygieia-api | /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
hygieia-api | ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
hygieia-api | \\/ ___)| |_)| | | | | || (_| | ) ) ) )
@kamal2222ahmed
kamal2222ahmed / docker-macos-terraform.md
Created May 15, 2019 23:37 — forked from brianshumate/docker-macos-terraform.md
The Simplest Terraform with Docker on macOS

If you'd like to experiment with Terraform on macOS locally, a great provider for doing so is the Docker provider. You can get set up in a few simple steps, like so:

1. Install Docker

Install Docker for Mac if you have not already.

@kamal2222ahmed
kamal2222ahmed / cache-warmer.py
Created May 8, 2019 18:07 — forked from hn-support/cache-warmer.py
A threaded cache warmer in python
#!/usr/bin/env python
"""
Warm the caches of your website by crawling each page defined in sitemap.xml.
To use, download this file and make it executable. Then run:
./cache-warmer.py --threads 4 --file /data/web/public/sitemap.xml -v
"""
import argparse
import multiprocessing.pool as mpool
import os.path
import re
TASK [Initialize the Kubernetes cluster using kubeadm] *************************
fatal: [k8s-master]: FAILED! => {"changed": true, "cmd": ["kubeadm", "init", "--apiserver-advertise-address=192.168.50.10", "--apiserver-cert-extra-sans=192.168.50.10", "--pod-network-cidr=192.168.0.0/16", "--kubernetes-version", "v1.14.1", "--ignore-preflight-errors", "all"], "delta": "0:04:06.796106", "end": "2019-04-23 12:22:43.146624", "msg": "non-zero return code", "rc": 1, "start": "2019-04-23 12:18:36.350518", "stderr": "\t[WARNING IsDockerSystemdCheck]: detected \"cgroupfs\" as the Docker cgroup driver. The recommended driver is \"systemd\". Please follow the guide at https://kubernetes.io/docs/setup/cri/\n\t[WARNING ImagePull]: failed to pull image k8s.gcr.io/kube-apiserver:v1.14.1: output: Error response from daemon: Get https://k8s.gcr.io/v2/: x509: certificate signed by unknown authority\n, error: exit status 1\n\t[WARNING ImagePull]: failed to pull image k8s.gcr.io/kube-controller-manager:v1.14.1: output: Error respo
@kamal2222ahmed
kamal2222ahmed / README.md
Created April 19, 2019 11:54 — forked from ColCh/README.md
Create merge request on Gitlab in command line for current branch

Gitlab merge request script

Creates merge request on Gitlab for you

Installation

Download it, add executable perms and place into PATH:

# Place it into ~/.bin
mkdir ~/.bin
@kamal2222ahmed
kamal2222ahmed / docker-jenkins-job-dsl.sh
Created February 17, 2019 15:55 — forked from marcelbirkner/docker-jenkins-job-dsl.sh
Docker Hub docker-jenkins-job-dsl
docker run --publish=8080:8080 mbirkner/docker-jenkins-job-dsl
@kamal2222ahmed
kamal2222ahmed / peer_routes.py
Created March 25, 2018 20:17 — forked from bwhaley/peer_routes.py
A script to configure routes in in a VPC peering connection
# Quick script to configure routes for a VPC peering connection
# Searches a region for all peering connection and prompts to choose one
# Configures routes between the peered networks for all routing tables
# STS/AssumeRole not implemented cross-account peering. Instead,
# Choose accepter/requestor depending on which credentials are set in the environment
# Enter either IPv4 and IPv6 route destinations
# Example usage:
# ( Assuming boto credentials are configured)
# $ pip install boto3
# $ python3.6 peer_routes.py