This file contains 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
export async function recordCustomEvent(type: string, event: Record<string, string | number>) { | |
try { | |
const ACCOUNT_ID = process.env.NEW_RELIC_ACCOUNT_ID; | |
const LICENSE_KEY = process.env.NEW_RELIC_LICENSE_KEY; | |
const APP_NAME = process.env.NEW_RELIC_APP_NAME; | |
if (!ACCOUNT_ID || !LICENSE_KEY || !APP_NAME) { | |
console.warn("NEW_RELIC_ACCOUNT_ID or NEW_RELIC_LICENSE_KEY or NEW_RELIC_APP_NAME not found in ENV"); | |
return; | |
} |
This file contains 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
import { Stack } from "aws-cdk-lib" | |
import { Runtime, Architecture, ILayerVersion, LayerVersion, CfnFunction } from "aws-cdk-lib/aws-lambda" | |
import { NodejsFunction, NodejsFunctionProps } from "aws-cdk-lib/aws-lambda-nodejs" | |
import { Secret } from "aws-cdk-lib/aws-secretsmanager" | |
import { Construct } from "constructs" | |
/** | |
* A NodejsFunction with New Relic instrumentation. | |
* @see https://forum.newrelic.com/s/hubtopic/aAX8W0000008d3MWAQ/setting-up-new-relic-with-cdk | |
*/ |
This file contains 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
using Microsoft.Extensions.Logging; | |
using System; | |
using System.Collections.Concurrent; | |
using System.Collections.Generic; | |
using System.Collections.ObjectModel; | |
using System.Threading.Tasks; | |
using System.Threading; | |
namespace Utils | |
{ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
private (string type, byte[] data) DataUrlToBinary(string dataUrl) | |
{ | |
var match = Regex.Match(dataUrl, @"data:(?<type>.+?);base64,(?<data>.+)"); | |
var type = match.Groups["type"].Value; | |
var base64Data = match.Groups["data"].Value; | |
var binData = Convert.FromBase64String(base64Data); | |
return (type, binData); | |
} |
This file contains 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
import Controller from '@ember/controller'; | |
import { computed } from '@ember/object'; | |
import { ObjectPromiseProxy, resolvingPromise, resultObject } from '../utils/object-proxy'; | |
export default class ApplicationController extends Controller { | |
regularObject = resultObject; | |
//@computed() // uncomment this to get it to work 'somehow' | |
get promiseObj() { | |
return ObjectPromiseProxy.create({ |
This file contains 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
using System; | |
using System.Collections.Generic; | |
public class Program | |
{ | |
public static List<WinEnum> PlayerStats = new List<WinEnum>(); | |
public static void Main() | |
{ | |
Console.WriteLine("Welcome to my great game"); |
This file contains 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
import DS from 'ember-data'; | |
import Ember from 'ember'; | |
export default DS.RESTAdapter.extend({ | |
namespace: 'api' | |
}); |
This file contains 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
import DS from 'ember-data'; | |
export default DS.RESTAdapter.extend({}); |
NewerOlder