This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kubectl get deployments -A -o=jsonpath='{range .items[*]}{.metadata.namespace}{"\t"}{.metadata.name}{"\t"}{.spec.template.spec.containers[*].resources.requests.cpu}{"\t"}{.spec.template.spec.containers[*].resources.requests.memory}{"\n"}{end}' | |
kubectl get pods -A -o=jsonpath='{range .items[*]}{.metadata.namespace}{"\t"}{.metadata.name}{"\t"}{.spec.containers[*].resources.requests.cpu}{"\t"}{.spec.containers[*].resources.requests.memory}{"\n"}{end}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kind: RoleBinding | |
apiVersion: rbac.authorization.k8s.io/v1 | |
metadata: | |
name: namespace-admin-binding | |
namespace: [NAMESPACE] | |
subjects: | |
# Google Cloud user account | |
- kind: User | |
name: [useremail@intertech.com.tr] | |
roleRef: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading.Tasks; | |
using Microsoft.AspNetCore.Hosting; | |
using Microsoft.Extensions.Configuration; | |
using Microsoft.Extensions.Hosting; | |
using Microsoft.Extensions.Logging; | |
using Google.Cloud.Vision.V1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for file in *.feat;do | |
echo ${file##*/} | |
filename=${file##*/} | |
lastline="$(awk '/./{line=$0} END{print line}' $filename/filtered_func_data.ica/labels.txt)" | |
echo ${lastline} | |
length=${#lastline} | |
parsed=${lastline:1:length-2} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install parallel first (sudo apt-get install -y parallel) | |
JOB_NUM=10 | |
NAME_FILTER='*' | |
# stop instances | |
gcloud compute instances list --filter=name:$NAME_FILTER | awk '/RUNNING/ {printf "gcloud -q compute instances stop %s --zone %s;\n", $1, $2 > "stop-instances.txt" }' | |
parallel --jobs $JOB_NUM < stop-instances.txt | |
# remove delete protection |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
vault: | |
container_name: vault.server | |
image: vault | |
networks: | |
- consul-demo | |
ports: | |
- "9200:8200" | |
cap_add: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM mcr.microsoft.com/dotnet/core/aspnet:2.1 | |
WORKDIR "/app" | |
COPY . . | |
ENTRYPOINT ["dotnet", "PROJECT_NAME.dll"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: coffee | |
spec: | |
replicas: 2 | |
selector: | |
matchLabels: | |
app: coffee | |
template: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:argon | |
RUN mkdir -p /usr/src/app | |
WORKDIR /usr/src/app | |
RUN apt-get update | |
RUN apt-get -y install mongodb | |
CMD ["/usr/bin/mongod", "--config", "/etc/mongodb.conf"] | |
COPY package.json /usr/src/app/ |