Skip to content

Instantly share code, notes, and snippets.

View meddulla's full-sized avatar

Sofia meddulla

  • Cloudflare
  • Portugal
View GitHub Profile
@meddulla
meddulla / README.md
Last active March 13, 2018 09:48
leader election token

Since we have leader election true:

kubectl create -f datadog/dd-configmap.yaml

Ensure we have all the permissions we need (including for leader election):

kubectl create -f datadog/datadog-rbac.yaml

Set up a mock check integration (hhtp_check) so that logs are enabled (otherwise it shows logs as disabled)

@meddulla
meddulla / Optimization.ipynb
Created December 29, 2017 23:40
Optimization notebook in lesson 2 of fast course (https://www.youtube.com/watch?v=e3aM6XTekJc&t=4691s)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@meddulla
meddulla / echo-deployment.yml
Last active December 3, 2017 22:47
Example kubernetes app deployment on a kubernetes cluster with kube lego
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: echo
spec:
replicas: 2
template:
metadata:
labels:
@meddulla
meddulla / inline_code.org
Created December 2, 2017 15:45
Examples for inline code in org mode (python, ipython, R, ditaa, shell , latex)
+-------+
| Hello |
+-------+
@meddulla
meddulla / example.plantuml
Last active December 2, 2017 12:47 — forked from QuantumGhost/example.puml
A simple template for PlantUML to draw ER diagram.The basic idea comes from http://plantuml.sourceforge.net/qa/?qa=331/database-modeling
@startuml
' uncomment the line below if you're using computer with a retina display
' skinparam dpi 300
!define Table(name,desc) class name as "desc" << (T,#FFAAAA) >>
' we use bold for primary key
' green color for unique
' and underscore for not_null
!define primary_key(x) <b>x</b>
!define unique(x) <color:green>x</color>
!define not_null(x) <u>x</u>
@meddulla
meddulla / vm-resize-hard-disk.md
Last active November 11, 2017 17:33 — forked from christopher-hopper/vm-resize-hard-disk.md
Resize a Hard Disk for a Virtual Machine provisioned using Vagrant from a Linux base box to run using VirutalBox.

Resize a Hard Disk for a Virtual Machine

Our Virtual Machines are provisioned using Vagrant from a Linux base box to run using VirutalBox. If the Hard Disk space runs out and you cannot remove files to free-up space, you can resize the Hard Disk using some VirtualBox and Linux commands.

Some assumptions

The following steps assume you've got a set-up like mine, where:

@meddulla
meddulla / ehcache.xml
Created August 23, 2017 13:24 — forked from oscarrenalias/ehcache.xml
A better ehcache.xml configuration file for the Play Framework, which out of the box limits the size of the cache based on the number of objects you put in it rather than the number of bytes. I personally think that's not a very smart choice. Also see http://ehcache.org/documentation/2.5/configuration/cache-size#cache-configuration-sizing-attrib…
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../config/ehcache.xsd" updateCheck="false">
<!-- This is a default configuration for 256Mb of cached data using the JVM's heap, but it must be adjusted
according to specific requirement and heap sizes -->
<defaultCache
maxBytesLocalHeap="256000000"
eternal="false"
timeToIdleSeconds="120"
timeToLiveSeconds="120"
@meddulla
meddulla / Rules.scala
Last active September 14, 2020 20:31
Limit a ListInputType in graphql
package graphql
import org.parboiled2.Position
import sangria.ast.AstVisitorCommand
import sangria.parser.SourceMapper
import sangria.validation._
import sangria.{ast, schema}
/**
*
@meddulla
meddulla / croc-hunter.sh
Created June 20, 2017 16:56 — forked from etoews/croc-hunter.sh
Rough notes on getting this "Zero to Kubernetes CI/CD in 5 minutes with Jenkins and Helm" demo https://www.youtube.com/watch?v=eMOzF_xAm7w running on MS Azure Container Service.
# https://github.com/Microsoft/azure-docs/blob/master/articles/container-service/container-service-kubernetes-walkthrough.md
alias az="docker run --rm --volume ${HOME}:/root azuresdk/azure-cli-python az"
az login
RESOURCE_GROUP=kubernetes
LOCATION=southcentralus
DNS_PREFIX=phymata
CLUSTER_NAME=kubernetes
@meddulla
meddulla / SangriaMinimal.scala
Last active May 23, 2017 17:52
Minimal sangria example with play's json lib (worksheet)
import sangria.ast.Document
import sangria.execution.{ErrorWithResolver, Executor, QueryAnalysisError}
import sangria.macros.derive.{ObjectTypeDescription, ObjectTypeName, deriveObjectType}
import sangria.parser.{QueryParser, SyntaxError}
import sangria.renderer.SchemaRenderer
import sangria.schema.{Argument, Field, IntType, ListType, ObjectType, OptionInputType, Schema, fields}
import scala.concurrent.Await
import scala.concurrent.duration._
import scala.concurrent.ExecutionContext.Implicits.global