There is only amd64 docker image for SonarQube. We need to build by ourselves if we want to run it on Mac M1.
mkdir sonarqube_local
cd sonarqube_local
PROJECT_DIR=$(PWD)
/** | |
* Example | |
* Input: 'INFO Records: {"user": {"name": "luke", "type": "jedi"}}{"name": "leia"}, Record count: 2' | |
* Output: [ | |
"INFO Records: ", | |
"{\n \"user\": {\n \"name\": \"luke\",\n \"type\": \"jedi\"\n }\n}", | |
"{\n \"name\": \"leia\"\n}", | |
", Record count: 2" | |
] | |
*/ |
<!DOCTYPE html> | |
<html> | |
<body> | |
<script src="https://www.google.com/recaptcha/api.js?render=Your_Recaptcha_Site_Key"></script> | |
<h2>Sign up</h2> | |
<form id="signup-form"> | |
<div> | |
<input type="email" name="username" placeholder="Email"> | |
</div> |
const Auth = require('@aws-amplify/auth').default; | |
// Please replace the property values | |
const config = { | |
aws: { | |
region: '<Your aws region>', | |
cognito: { | |
userPoolId: '<Your Cognito user pool ID>', | |
userPoolWebClientId: '<Your Cognito user pool web client ID>', | |
}, |
const axios = require('axios'); | |
// Please replace the property values | |
const config = { | |
recaptcha: { | |
secretKey: '<Your reCAPTCHA secret key>', | |
}, | |
}; | |
exports.handler = async (event) => { |
#!/bin/bash | |
SERIAL_NUMBER=$1 | |
OTP=$2 | |
PROFILE=$3 | |
CREDENTIALS=$(aws sts get-session-token \ | |
--serial-number ${SERIAL_NUMBER} \ | |
--token-code ${OTP} \ | |
--query 'Credentials.[AccessKeyId,SecretAccessKey,SessionToken]' \ | |
--output text) |
public class MyTest { | |
// Only work for Blpapi Java 3.16.1 and above | |
@Test | |
public void myTest() { | |
Service service; | |
try (InputStream is = getClass().getResourceAsStream("/marketDataSchema.xml")) { | |
service = TestUtil.deserializeService(is); | |
} | |
SchemaElementDefinition elementDef = service.getEventDefinition(new Name("MarketDataEvents")); |
terraform { | |
required_providers { | |
aws = { | |
source = "hashicorp/aws" | |
version = "~> 3.0" | |
} | |
} | |
required_version = "~> 1.0.0" | |
} |
// Build: gcc -framework Security -framework Foundation -o add_generic_password add_generic_password.c | |
// Usage: ./add_generic_password <service name> <username> <password> | |
#include <CoreFoundation/CoreFoundation.h> | |
#include <Security/Security.h> | |
int main(int argc, const char* argv[]) { | |
if (argc < 4) { | |
fprintf(stderr, "Usage: ./add_generic_pasword <service name> <username> <password>"); | |
return 1; |
// Build: gcc -framework Security -framework Foundation -o get_generic_password get_generic_password.c | |
// Usage: ./get_generic_password <service name> | |
#include <CoreFoundation/CoreFoundation.h> | |
#include <Security/Security.h> | |
OSStatus getCredentialByServiceName(const char *serviceName, CFTypeRef *credential) { | |
CFStringRef cfServiceName = CFStringCreateWithCString(kCFAllocatorDefault, serviceName, kCFStringEncodingUTF8); | |
const void* keys[] = { kSecClass, kSecAttrService, kSecReturnAttributes, kSecReturnData, kSecMatchLimit }; |