This file contains hidden or 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 create clusterrolebinding cluster-admin-binding \ | |
--clusterrole=cluster-admin \ | |
--user=$(gcloud config get-value core/account) |
This file contains hidden or 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
gcloud config get-value core/account |
This file contains hidden or 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
import { Component } from '@angular/core'; | |
import { ActivatedRoute } from '@angular/router'; | |
@Component({ | |
selector: 'app-awesome', | |
templateUrl: './app-awesome.component.html', | |
styleUrls: [ './app-awesome.component.scss' ] | |
}) | |
export class AwesomeComponent { |
This file contains hidden or 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
const https = require('https') | |
const data = JSON.stringify({ | |
someProp: 'some value' | |
}); | |
const options = { | |
This file contains hidden or 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
while true; do | |
mycommand & | |
last_pid=$! | |
sleep(60) // 60 seconds | |
kill -KILL $last_pid |
This file contains hidden or 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
db.createUser({ | |
user: "admin" , | |
pwd: "password", | |
roles: ["userAdminAnyDatabase", "dbAdminAnyDatabase", "readWriteAnyDatabase"] | |
}) |
This file contains hidden or 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/sh | |
curl -L -O https://sourceforge.net/projects/mtop/files/mtop/v0.6.6/mtop-0.6.6.tar.gz | |
tar -xvzf mtop-0.6.6.tar.gz | |
rm -rf mtop-0.6.6.tar.gz | |
cd mtop-0.6.6 | |
yum install -y perl-devel cpan perl-DBD-MySQL | |
cpan force install Curses |
This file contains hidden or 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
pipeline { | |
agent any | |
options { | |
disableConcurrentBuilds() | |
buildDiscarder(logRotator(numToKeepStr: '1')) | |
} |
This file contains hidden or 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
[root@ip-172-31-20-63 centos]# cat /etc/haproxy/haproxy.cfg | |
defaults | |
option http-server-close | |
mode http | |
timeout http-request 5s | |
timeout connect 5s | |
timeout server 10s | |
timeout client 30s |
This file contains hidden or 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
openssl genrsa -out ca-key.pem 4096 | |
openssl req -x509 -new -nodes -key ca-key.pem -days 10000 -out ca.pem -subj '/CN=docker-CA' | |
openssl genrsa -out key.pem 4096 | |
openssl req -new -key key.pem -out cert.csr -subj '/CN=docker-client' -config openssl.cnf | |
openssl x509 -req -in cert.csr -CA ca.pem -CAkey ca-key.pem -CAcreateserial -out cert.pem -days 365 -extensions v3_req -extfile openssl.cnf |