Skip to content

Instantly share code, notes, and snippets.

View edgarsandi's full-sized avatar
👋
Hi there

Edgar R. Sandi edgarsandi

👋
Hi there
View GitHub Profile
@edgarsandi
edgarsandi / markdown-details-collapsible.md
Last active November 4, 2022 12:59 — forked from pierrejoubert73/markdown-details-collapsible.md
How to add a collapsible section in markdown.

How to

<details>
  <summary>Click me</summary>
  
  ### Heading
  1. Foo
  2. Bar
     * Baz
 * Qux
@edgarsandi
edgarsandi / terraform-cost-estimation.rego
Created October 23, 2020 13:28 — forked from antonbabenko/terraform-cost-estimation.rego
Terraform Cost Estimation + Open Policy Agent
# Terraform Cost Estimation + Open Policy Agent
#
# This code snippet supports terraform state for now.
#
# Get the whole response:
# opa eval --data terraform-cost-estimation.rego --input terraform.tfstate --format pretty data.terraform_cost_estimation
#
# Get boolean response. Return false if state (per hour) is too expensive:
# opa eval --data terraform-cost-estimation.rego --input terraform.tfstate --format pretty data.terraform_cost_estimation.response.allowed
@edgarsandi
edgarsandi / terraform_terragrunt_aliases
Created June 6, 2020 04:21 — forked from uolter/terraform_terragrunt_aliases
Useful Terraform and Terrgagrunt aliases
# Terraform
alias trf='terraform'
## Terragrunt
alias trg='terragrunt'
alias trgfmt='terragrunt hclfmt'
alias trglint='find . -type f -not -path "*/\.*" | grep ".hcl" | terragrunt hclfmt'
alias trgcleancache='find . -type d -name ".terragrunt-cache" -prune -exec rm -rf {} \;'
function trginitall() {
@edgarsandi
edgarsandi / README.md
Created June 5, 2020 02:18 — forked from mbaitelman/README.md
Automated Terraform Deployments Using Bitbucket Pipelines
#!/usr/local/bin/python3
from kubernetes import client, config
import sys
config.load_kube_config()
def print_help():
print('I need the namespace(s) as an argument')
if len(sys.argv) <= 1:

Introduction

  • C-a == Ctrl-a
  • M-a == Alt-a

General

:q        close
:w        write/saves
:wa[!]    write/save all windows [force]
:wq       write/save and close
<?php declare(strict_types=1);
if (
extension_loaded( 'xdebug' )
&& version_compare( '2.6.0', phpversion( 'xdebug' ), '<=' )
)
{
/** @noinspection PhpUndefinedFunctionInspection */
/** @noinspection PhpUndefinedConstantInspection */
xdebug_set_filter(
@edgarsandi
edgarsandi / Dockerfile
Created February 28, 2018 03:58 — forked from SammyK/Dockerfile
Writing tests for php-src: Docker setup
FROM ubuntu:16.04
MAINTAINER Sammy Kaye Powers
RUN apt-get update \
&& apt-get install sudo vim git -y \
&& apt-get install build-essential autoconf valgrind -y \
&& apt-get install re2c bison -y \
&& apt-get install libxml2-dev locales lcov -y
@edgarsandi
edgarsandi / configure_docker0.sh
Created May 4, 2017 19:36
Change the IP subnet of Docker's docker0 interface
#!/bin/sh -e
#
# You can run this script directly from github as root like this:
# curl -sS https://gist.githubusercontent.com/fabiorphp/a94e0ea2558b3d10185d6d69d053c2b2/raw/configure_docker0.sh | sudo bash -s - 172.31.0.21/16
#
# * Make sure you replace "192.168.254.0/24" with the network that you want to use
#
# NOTE: This script is intended for Debian / Ubuntu only!
if [ $# -lt 1 ]; then

Quick install PHP 7.0:

1. Install depends PHP 7.0
$ brew install autoconf automake gmp homebrew/versions/bison27 gd freetype t1lib gettext zlib mcrypt
2. Configure PHP 7.0
$ git clone --depth=1 https://github.com/php/php-src.git

$ cd php-src