mkdir -p jenkins_local
cd jenkins_local
PROJECT_DIR=$(PWD)
mkdir -p jenkins_home
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.example; | |
import org.quartz.DisallowConcurrentExecution; | |
import org.quartz.Job; | |
import org.quartz.JobExecutionContext; | |
import org.quartz.JobExecutionException; | |
import org.quartz.PersistJobDataAfterExecution; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.example; | |
import org.quartz.Job; | |
import org.quartz.JobBuilder; | |
import org.quartz.JobDetail; | |
import org.quartz.JobExecutionContext; | |
import org.quartz.JobExecutionException; | |
import org.quartz.Scheduler; | |
import org.quartz.SchedulerFactory; | |
import org.quartz.Trigger; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.franzwong.selector; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import java.net.InetSocketAddress; | |
import java.nio.ByteBuffer; | |
import java.nio.channels.SocketChannel; | |
public class Client { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
terraform { | |
required_providers { | |
aws = { | |
source = "hashicorp/aws" | |
version = "~> 3.0" | |
} | |
} | |
required_version = "~> 1.0.0" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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")); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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) |