Skip to content

Instantly share code, notes, and snippets.

View igomez10's full-sized avatar

Ignacio Gomez igomez10

View GitHub Profile
@igomez10
igomez10 / config
Last active June 11, 2019 09:04
kubectl generic config WITHOUT TLS
apiVersion: v1
clusters:
- cluster:
certificate-authority-data: DATA+OMITTED
server: 1.2.3.4
name: default
contexts:
- context:
cluster: default
user: default

Keybase proof

I hereby claim:

  • I am igomez10 on github.
  • I am igomeza (https://keybase.io/igomeza) on keybase.
  • I have a public key ASCj45McbWrATK4gKFxokvsn3O2f1gPXEEtVnaRFVfp4tQo

To claim this, I am signing this object:

@igomez10
igomez10 / genericDataStructure.go
Last active April 26, 2019 15:45
Generic data structure in Go
package main
import "fmt"
type hack struct {
value interface{}
}
func main() {
@igomez10
igomez10 / LinkedLists.go
Last active March 1, 2019 23:33
Linked Lists In Go
package main
import (
"fmt"
"log"
)
type singlyLinkedListNode struct {
data int32
next *singlyLinkedListNode
fs := http.FileServer(http.Dir("."))
http.Handle("/", fs)
http.ListenAndServe(":8080", nil)
@igomez10
igomez10 / rsa-csr.md
Last active December 10, 2018 10:49
Generate private key, public key and sign a csr using the keypair

1. Generate .pem private key

 openssl genrsa -des3 -out private.pem 4096

2. Generate .pem public key from ./private.pem created in previous step.

Basically extracting a public key from the private key

openssl rsa -in private.pem -outform PEM -pubout -out public.pem
from collections import deque
def getBiggestRegion(grid):
def size(i, j):
if 0 <= i < len(grid) and 0 <= j < len(grid[i]) and grid[i][j] == 1:
grid[i][j] = 0
counter = sum([size(i2,j2) for i2 in range(i-1, i+2) for j2 in range(j-1, j+2)])
return 1 + counter
return 0
return(max( size(a,b) for a in range(len(grid)) for b in range( len(grid[a])) ))