Skip to content

Instantly share code, notes, and snippets.

View devondragon's full-sized avatar
💭
Building the Next Big Thing!

Devon Hillard devondragon

💭
Building the Next Big Thing!
View GitHub Profile
@devondragon
devondragon / dashEmbed.java
Created September 27, 2023 00:56
This is source provided by Xiaofan which avoids the CORS/CSP issues by handling the auth check and OAuth redirect on the server side
@GetMapping({"/dash-embedded"})
public String dashEmbedded(
Principal principal,
Model model,
HttpServletRequest request,
HttpServletResponse response) throws UnsupportedEncodingException {
log.error("embeddedAuthCheck() running");
String shopName = getShopNameFromRequest(request);
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
name: Java CI with Gradle
on:
@devondragon
devondragon / build.gradle
Created September 18, 2022 21:03
build.gradle for micronaut native on M1
buildscript {
dependencies {
classpath("com.github.docker-java:docker-java:3.2.13")
classpath("com.github.docker-java:docker-java-transport-httpclient5:3.2.13")
}
}
plugins {
id("com.github.johnrengelman.shadow") version "7.1.2"
id("io.micronaut.application") version "3.6.0"
@devondragon
devondragon / gist:7b050fc10e87d3e7f002beb1e9e5cbbe
Last active October 30, 2023 22:07
eclipse-blackmagic-style.xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<profiles version="13">
<profile kind="CodeFormatterProfile" name="GoogleStyle" version="13">
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="@formatter:off"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/>
# This script will pick a random winner from your MailChimp audience. Useful for giveaways!
# Just set the Audience ID, API_KEY, and Datacenter with the correct information for your mailing list
require 'rubygems'
require 'net/http'
require 'json'
AUDIENCE_ID = "YYYYYYYY"
API_KEY = "XXXXXXX"
DATACENTER = "us4"
BASE_URL = "https://" + DATACENTER + ".api.mailchimp.com/export/1.0/list/"
# MC4WP Start
# Apache 2.2
<IfModule !authz_core_module>
<Files mc4wp-debug-log.php>
deny from all
</Files>
</IfModule>
# Apache 2.4+
<IfModule authz_core_module>
<Files mc4wp-debug-log.php>
❯ serverless create -t aws-java-gradle -p Test-Service-Serverless -n Test-Service
Serverless: Generating boilerplate...
Serverless: Generating boilerplate in "/Users/devon/Dropbox (Personal)/Home/devon/Downloads/Test-Service-Serverless"
_______ __
| _ .-----.----.--.--.-----.----| .-----.-----.-----.
| |___| -__| _| | | -__| _| | -__|__ --|__ --|
|____ |_____|__| \___/|_____|__| |__|_____|_____|_____|
| | | The Serverless Application Framework
| | serverless.com, v1.44.1
-------'