Skip to content

Instantly share code, notes, and snippets.

@azcoov
azcoov / lessneglect.lib.php
Created November 13, 2012 20:59 — forked from DeviaVir/lessneglect.lib.php
A PHP library for the lessneglect.com API
<?PHP
Class LN {
// API credentials
private static $api_key = '';
private static $api_secret = '';
// Production (no sandboxed version available yet)
private static $api_url = 'https://lessneglect.com/api/v2/';
// Show debug messages?
@azcoov
azcoov / README.md
Last active December 11, 2015 01:08 — forked from mbostock/.block
@azcoov
azcoov / neglect.rb
Last active December 11, 2015 23:09 — forked from gooley/neglect.rb
Sample ruby helper method for the Less Neglect Ruby Gem
# TODO - make sure you have the 'lessneglect' gem installed
# https://github.com/lessneglect/lessneglect-ruby
require 'lessneglect'
class Neglect
def self.api
# TODO - replace with your Less Neglect API credentials
@@api ||= LessNeglectApi::Client.new({
:code => "asdfasdf",
#!/usr/bin/env ruby
# Libraries:::::::::::::::::::::::::::::::::::::::::::::::::::::::
require 'rubygems'
require 'sinatra/base'
require 'slim'
require 'sass'
require 'coffee-script'
# Application:::::::::::::::::::::::::::::::::::::::::::::::::::
def update_ducksboard
api_key = ""
api_secret = ""
url = "https://#{api_key}:#{api_secret}@api.preact.io/api/v2/insights/health"
data = RestClient.get "#{url}", :content_type => :json, :accept => :json
accounts = data["accounts"]
# boxes
push_duck("YOUR_DATAPOINT_ID", accounts["good"]) # good account health
#!/bin/sh
# Licence: MIT
# Created by tomykaira, 2011-10-25
if [ $# -ne 1 ]; then
echo "Give me your new project name (only)"
exit 1
fi
{
"event": "subscriber.subscribed",
"data": {
"object": {
"id": 99999,
"email": "[email protected]",
"fields": {
"first_name": "John",
"last_name": "Doe"
},
@azcoov
azcoov / widget.js
Created December 27, 2013 21:54 — forked from lukencode/widget.js
(function () {
var scriptName = "embed.js"; //name of this script, used to get reference to own tag
var jQuery; //noconflict reference to jquery
var jqueryPath = "http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js";
var jqueryVersion = "1.8.3";
var scriptTag; //reference to the html script tag
/******** Get reference to self (scriptTag) *********/
var allScripts = document.getElementsByTagName('script');
var QUEUE_URL = 'https://sqs.us-east-1.amazonaws.com/{AWS_ACCUOUNT_}/matsuoy-lambda';
var AWS = require('aws-sdk');
var sqs = new AWS.SQS({region : 'us-east-1'});
exports.handler = function(event, context) {
var params = {
MessageBody: JSON.stringify(event),
QueueUrl: QUEUE_URL
};
sqs.sendMessage(params, function(err,data){
using Bugsnag.Clients;
using System;
using System.Web.Mvc;
namespace MyAwesomeWebApp
{
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, Inherited = true, AllowMultiple = true)]
public sealed class BugsnagExceptionHandler : HandleErrorAttribute
{
internal BugsnagExceptionHandler()