Skip to content

Instantly share code, notes, and snippets.

Jose Armesto fiunchinho

Block or report user

Report or block fiunchinho

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 gist:9df55923233f17bb99a82d196b9ff931
https://docs.google.com/presentation/d/18c0x7QhfDSxcgUZaDHgyT5UbdE2bAm2yeAXnNGjdR4U/edit?usp=sharing
https://drive.google.com/open?id=1m-lhdU-iGoGGgYkVcH_rJSz-fxzwzaMi
@fiunchinho
fiunchinho / service.go
Created Dec 3, 2018
Dependency injection
View service.go
func NewIamRoleAnnotator(k8sCli kubernetes.Interface, awsAccountID string, logger Logger) *IamRoleAnnotator {
return &IamRoleAnnotator{
client: k8sCli,
awsAccountID: awsAccountID,
logger: logger,
}
}
@fiunchinho
fiunchinho / service.go
Created Dec 3, 2018
object using the client-go library directly
View service.go
func (s *IamRoleAnnotator) submitChangesToKubernetesAPI(deployment *appsv1beta1.Deployment) (*appsv1beta1.Deployment, error) {
s.logger.Infof("Sending changes to k8s API")
return s.client.AppsV1beta1().Deployments(deployment.Namespace).Update(deployment)
}
@fiunchinho
fiunchinho / ping.php
Created Dec 16, 2017
Example application for CodelyTvPro
View ping.php
<?php
echo "Ping " . $_SERVER['SERVER_ADDR'];
@fiunchinho
fiunchinho / main.go
Created Aug 15, 2017
Controller that whitelist IP's on ingress objects
View main.go
package main
import (
"flag"
"fmt"
"log"
"reflect"
"time"
"k8s.io/apimachinery/pkg/util/runtime"
@fiunchinho
fiunchinho / ansistrano.md
Created Mar 27, 2017
Ansistrano on fresh EC2 Ubuntu
View ansistrano.md

Playbook

---
- hosts: localhost
  vars:
    ansistrano_deploy_to: "/var/www/html"
  roles:
    - carlosbuenosvinos.ansistrano-deploy
@fiunchinho
fiunchinho / elastic.md
Last active Jan 28, 2017
Useful endpoints to monitor cluster health
View elastic.md

Useful ElasticSearch urls

/_cluster/health?v
/_cat/nodes?v
/_nodes/stats/_all
/_cat/indices?v
/_cat/shards?v
@fiunchinho
fiunchinho / endpoint.java
Last active Aug 16, 2016
Endpoint that returns 400 Bad requests when coming from Zuul
View endpoint.java
@RequestMapping(value = "/endpoint", method = RequestMethod.PUT, produces = "application/json")
public Single<String> sayHello(HttpServletResponse response) throws IOException {
InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream("payload_big.json");
Observable<String> sobs = Observable.create(new Observable.OnSubscribe<String>() {
@Override
public void call(Subscriber<? super String> subscriber) {
try {
BufferedReader br = new BufferedReader(new InputStreamReader(inputStream));
@fiunchinho
fiunchinho / OneLiners.md
Last active May 5, 2016
One liners to fetch, uncompress and remove
View OneLiners.md
View gist:1b43856fced9c29c2f66
### Keybase proof
I hereby claim:
* I am fiunchinho on github.
* I am fiunchinho (https://keybase.io/fiunchinho) on keybase.
* I have a public key whose fingerprint is 7835 2286 73D6 3CA1 2FFE AC8A 8162 5EDD B10E 8F93
To claim this, I am signing this object:
You can’t perform that action at this time.