Skip to content

Instantly share code, notes, and snippets.

🤘
it ain't easy.

Matthew Davis mateothegreat

🤘
it ain't easy.
Block or report user

Report or block mateothegreat

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View create_clusterrolebinding.sh
kubectl create clusterrolebinding cluster-admin-binding \
--clusterrole=cluster-admin \
--user=$(gcloud config get-value core/account)
View keybase.me
### Keybase proof
I hereby claim:
* I am mateothegreat on github.
* I am mateothegreat (https://keybase.io/mateothegreat) on keybase.
* I have a public key whose fingerprint is BEF4 96DB 9A86 ADEE 2E27 BCBB 8F43 21E1 7D2D 9CA0
To claim this, I am signing this object:
@mateothegreat
mateothegreat / awesome.component.ts
Last active Feb 14, 2019
Retrieve the hash value of a route (#myhash)
View awesome.component.ts
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 {
View request.js
const https = require('https')
const data = JSON.stringify({
someProp: 'some value'
});
const options = {
View restarter.sh
while true; do
mycommand &
last_pid=$!
sleep(60) // 60 seconds
kill -KILL $last_pid
View create_admin_user.json
db.createUser({
user: "admin" ,
pwd: "password",
roles: ["userAdminAnyDatabase", "dbAdminAnyDatabase", "readWriteAnyDatabase"]
})
@mateothegreat
mateothegreat / install.sh
Created Oct 5, 2018
Install MySQL Top (mtop) on RHEL/CentOS
View install.sh
#!/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
@mateothegreat
mateothegreat / Jenkinsfile
Created Jun 5, 2018
Jenkins pipeline with k8/docker support
View Jenkinsfile
pipeline {
agent any
options {
disableConcurrentBuilds()
buildDiscarder(logRotator(numToKeepStr: '1'))
}
@mateothegreat
mateothegreat / haproxy.cfg
Created May 21, 2018
Rate Limiting with HAproxy
View haproxy.cfg
[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
You can’t perform that action at this time.