Skip to content

Instantly share code, notes, and snippets.

View alexandramartinez's full-sized avatar
🐱
Fighting w/my cat

Alex Martinez alexandramartinez

🐱
Fighting w/my cat
View GitHub Profile
import java.util.Base64;
public class Base64UrlEncoding {
public static void main(String []args) {
byte[] bytes = "prostdev?blog".getBytes();
String encodedString = new String(Base64.getUrlEncoder().encode(bytes));
System.out.println(encodedString);
}
}
%dw 2.0
output application/json
var newObject = {
fieldC: "Field C Value"
}
var newObject2 = {
fieldD: "Field D Value",
object2: {
%dw 2.0
output application/json
var newObject = {
fieldC: "Field C Value"
}
var newObject2 = {
fieldD: "Field D Value",
object2: {
%dw 2.0
output application/json
var newObject = {
fieldC: "Field C Value"
}
var newObject2 = {
fieldD: "Field D Value",
object2: {
var jsonData = pm.response.json();
pm.test("Content-Type is present", function () {
pm.response.to.have.header("Content-Type");
});
pm.test("Content-Type is application/json", function () {
pm.expect(postman.getResponseHeader("Content-Type")).to.include("application/json");
});
#!/bin/bash
yum update -y
yum install -y httpd24 php56 mysql php56-mysqlnd
service httpd start
chkconfig httpd on
echo "fs-56fc251e.efs.us-east-1.amazonaws.com:/ /var/www/html nfs4 nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2 0 0" >> /etc/fstab
mount -a
@alexandramartinez
alexandramartinez / 01-DW-2.md
Last active May 28, 2020 14:41
DW 2.0 functions

DataWeave 2.0 Cheatsheet

Object Concatenation

(object-concatenation.dwl)

  • Using ++
  • Using {( )}
  • Using {([ ])}

String Concatenation

(string-concatenation.dwl)

@alexandramartinez
alexandramartinez / 01-Postman-Scripts.md
Last active June 10, 2024 23:37
Postman scripts cheatsheet

Postman Scripts Cheatsheet

Here you can find some of the most used scripts for Postman testing.

At least some of the most used by me :-)

Postman Objects

(pm-objects.js)

  • Global variables
  • Environment variables