Skip to content

Instantly share code, notes, and snippets.

View jaycdave88's full-sized avatar

Jay C. Davé jaycdave88

View GitHub Profile
@jaycdave88
jaycdave88 / 0_reuse_code.js
Created March 28, 2016 15:03
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@jaycdave88
jaycdave88 / Azure code
Created April 12, 2016 19:47
Azure code
using System;
using Microsoft.WindowsAzure.Storage;
using Microsoft.WindowsAzure.Storage.Blob;
using Microsoft.Azure;
using System.Collections.Generic;
namespace AzurePOC
{
class Program
{
#region
using System;
using System.Collections.Generic;
using System.Net;
using Microsoft.SharePoint.Client;
using Nuveen.DMG.Core.Services;
using System.Configuration;
using System.IO;
using System.Linq;
{
"id": "0001",
"type": "donut",
"name": "Cake",
"ppu": 0.55,
"batters":
{
"batter":
[
{ "id": "1001", "type": "Regular" },
@jaycdave88
jaycdave88 / Program.cs
Last active February 8, 2017 19:57
Microsoft Graph Service attempt to use Microsoft Graph CSharp SDK
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Net.Http.Headers;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Json;
using System.Threading.Tasks;
using System.Web;
@jaycdave88
jaycdave88 / Datadog slack integrations
Last active April 28, 2018 05:06
Datadog Slack Integrations list via Azure Function
module.exports = function(context, req) {
//add request-json module
var request = require("request-json");
//function for creating the obj based on the google custom search
function addToObj(title,link,displayLink){
return{
title: title,
link: link
@jaycdave88
jaycdave88 / gist:8d5e2a02634df897c8dbc02aab34b6c4
Created October 1, 2018 16:31
Datadog .NET APM manual instrument example
public AccountController(ApplicationUserManager userManager, ApplicationSignInManager signInManager )
{
using (var scope = Tracer.Instance.StartActive("web.request"))
{
var span = scope.Span;
span.Type = "web";
span.ResourceName = Request.Url.ToString();
span.SetTag("service", "fse-dotNet");
UserManager = userManager;
- hosts: servers
roles:
- { role: Datadog.datadog, become: yes }
vars:
datadog_api_key: "123456"
datadog_agent_version: "1:6.0.0-1" # for apt-based platforms, use a `6.0.0-1` format on yum-based platforms
datadog_config:
tags: "mytag0, mytag1"
log_level: INFO
apm_enabled: "true" # has to be set as a string
private void EnterBtnActionPerformed(java.awt.event.ActionEvent evt) {
try{
//set ID
rep.setSalesRepID(Integer.parseInt(IDTF.getText().trim()));
//set first name
rep.setFirstName(FirstNameTF.getText().trim());
//set last name
rep.setLastname(LastNameTF.getText().trim());
//set supplies
rep.setOfficeSupplies(Double.parseDouble(OfficeSuppliesTF.getText().trim()));
version: '3'
services:
mongo:
build: ./mongo
agent:
build: ./agent
environment:
- DD_API_KEY
- DD_APM_ENABLED=true
- DD_BIND_HOST=0.0.0.0