Skip to content

Instantly share code, notes, and snippets.

View buonzz's full-sized avatar

Darwin Biler buonzz

View GitHub Profile
@buonzz
buonzz / awesome-windows.md
Last active April 20, 2024 13:17
Awesome Windows
@buonzz
buonzz / aws_api_gateway.md
Last active February 18, 2024 16:21
AWS API Gateway

REST vs HTTP API

Choose REST APIs if you need features such as API keys, per-client throttling, request validation, AWS WAF integration, or private API endpoints. Choose HTTP APIs if you don't need the features included with REST APIs

HTTP Proxy Integrations w/ API key

  • Create new resource: method is ANY resource with {proxy+} as path
  • In method details, choose HTTP
  • in http method: ANY
  • in Endpoint URL: https://yourapi.example.com/path/{proxy} note that you cannot use root path here /, it has to be some subpath
  • ensure "HTTP proxy integration" is checked
  • click Save
@buonzz
buonzz / json_extract_mysql_5.6.sql
Created July 11, 2022 04:07
json extract mysql 5.6
DELIMITER $$
DROP function if exists json_extract_c$$
CREATE FUNCTION json_extract_c(
details TEXT,
required_field VARCHAR (255)
) RETURNS TEXT CHARSET utf8mb4
DETERMINISTIC
NO SQL
BEGIN
DECLARE search_term, val TEXT;
@buonzz
buonzz / sample-data-temp.json
Created November 19, 2020 14:48
sample data temp
{
"_embedded": [
{
"id": "RPT200090",
"created": "2020-07-22T14:45:37Z",
"modified": "2020-07-22T15:53:04Z",
"startDate": "2020-07-31",
"endDate": "2020-08-30",
"status": "arranging",
"agentRole": "managed",
@buonzz
buonzz / flutter_cheatsheet.md
Last active October 26, 2024 14:37
flutter cheatsheet

Installation

clone

git clone https://github.com/flutter/flutter.git -b stable

add the flutter/bin to your PATH variable

run flutter doctor

@buonzz
buonzz / aws-acm.md
Last active May 29, 2020 01:33
AWS Certificate Manager
  • X.509 - format of certificate for public and private keys
  • CMK - customer master key, to encrypt the private key
  • CA - certificate authority, entity that issues digital certificates. this is set in DNS record CAA to allow a CA to issue certificate for that domain
  • https://crt.sh/?q=darwinbiler.com. - lets you see the certificates issued to your domain (certificate transparency log). browsers used this to detect any anomaly in certificate
  • SCT - Signed Certificate Timestamp, ACM submits the certificate to at least two certificate transparency log servers. These servers add the certificate to their public databases and return a signed certificate timestamp (SCT) to the Amazon CA. it is then included in your X.509 certificate
  • TLD - rightmost label in the domain name, like .com .edu .gov
  • Apex domain - domain name + TLD example.com
  • FQDN - complete DNS name
@buonzz
buonzz / xdebug_cheatsheet_macos.md
Last active May 10, 2020 07:56
xdebug cheatsheet for MacOS

Profiling

is where you can find the profiling info generated by xdebug

xdebug.profiler_output_dir = /var/tmp

profile the page you visited when the XDEBUG_PROFILE variable is present in cookie/POST/GET

@buonzz
buonzz / install_jenkins.sh
Created May 2, 2020 02:24
Install Jenkins
wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -
sudo apt-add-repository "deb https://pkg.jenkins.io/debian-stable binary/"
apt-get update
apt-get install jenkins
@buonzz
buonzz / Install-Bamboo-in-Ubuntu-18.sh
Last active April 3, 2021 03:59
Install Bamboo in Ubuntu 18
sudo apt update
sudo apt install openjdk-8-jdk openjdk-8-jre
wget https://www.atlassian.com/software/bamboo/downloads/binary/atlassian-bamboo-7.0.3.tar.gz
cat >> /etc/environment <<EOL
JAVA_HOME= /usr/lib/jvm/java-8-openjdk-amd64
JRE_HOME=/usr/lib/jvm/java-8-openjdk-amd64/jre
EOL
tar xvzf atlassian-bamboo-7.0.3.tar.gz
@buonzz
buonzz / parse_pdf_file.md
Created April 5, 2020 14:24
Parse PDF file

download JAR file

wget https://github.com/tabulapdf/tabula-java/releases/download/v1.0.3/tabula-1.0.3-jar-with-dependencies.jar

place your pdf files in a folder

java -jar tabula-1.0.3-jar-with-dependencies.jar --pages 3-4 -b  /path-to-your/pdf-test-files/