Skip to content

Instantly share code, notes, and snippets.

View TheCloudlessSky's full-sized avatar

Adrian Phinney TheCloudlessSky

View GitHub Profile
@TheCloudlessSky
TheCloudlessSky / gist:3666530
Created September 7, 2012 14:06
Playing Audio
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script>
<script type="text/javascript">
function playRandomSong() {
var songs = [
'D:/Music/Dredg/Catch Without Arms/01 - Ode To The Sun.mp3',
var clientManager = new PooledRedisClientManager(redisConnection);
var messageProducerFactory = new RedisMessageFactory(clientManager);
Bind<IMessageProducer>()
.ToMethod(_ => messageProducerFactory.CreateMessageProducer())
.InRequestScope();
public class Line
{
public Point Start { get; set; }
public Point End { get; set; }
public int Width { get; set; }
public Color Color { get; set; }
}
@TheCloudlessSky
TheCloudlessSky / bundle.txt
Created September 26, 2014 16:16
GeoTrust SHA-2 Intermediate Certificates
-----BEGIN CERTIFICATE-----
MIIExzCCA6+gAwIBAgIQQYISfRLZxrMhOUMSVmQAuDANBgkqhkiG9w0BAQsFADCB
mDELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUdlb1RydXN0IEluYy4xOTA3BgNVBAsT
MChjKSAyMDA4IEdlb1RydXN0IEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25s
eTE2MDQGA1UEAxMtR2VvVHJ1c3QgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhv
cml0eSAtIEczMB4XDTEzMDUyMzAwMDAwMFoXDTIzMDUyMjIzNTk1OVowRjELMAkG
A1UEBhMCVVMxFjAUBgNVBAoTDUdlb1RydXN0IEluYy4xHzAdBgNVBAMTFkdlb1Ry
dXN0IFNIQTI1NiBTU0wgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB
AQDGqQtdF6V9xs8q78Zm0UIeX4N4aJGv5qeL8B1EAQoZypzUix3hoZCjwVu011tq
i/wOSR7CYin+gBU5i4EqJ7X7EqgFIgvFLPXZmN0WLztm52KiQzKsj7WFyFIGLFzA
@TheCloudlessSky
TheCloudlessSky / intermediate_ca.crt
Created October 4, 2014 12:58
GeoTrust Intermediate Certificates
-----BEGIN CERTIFICATE-----
MIIETzCCAzegAwIBAgIDAjpvMA0GCSqGSIb3DQEBCwUAMEIxCzAJBgNVBAYTAlVT
MRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJHZW9UcnVzdCBHbG9i
YWwgQ0EwHhcNMTMxMTA1MjEzNjUwWhcNMjIwNTIwMjEzNjUwWjBEMQswCQYDVQQG
EwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEdMBsGA1UEAxMUR2VvVHJ1c3Qg
U1NMIENBIC0gRzMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDjvn4K
hqPPa209K6GXrUkkTdd3uTR5CKWeop7eRxKSPX7qGYax6E89X/fQp3eaWx8KA7UZ
U9ulIZRpY51qTJEMEEe+EfpshiW3qwRoQjgJZfAU2hme+msLq2LvjafvY3AjqK+B
89FuiGdT7BKkKXWKp/JXPaKDmJfyCn3U50NuMHhiIllZuHEnRaoPZsZVP/oyFysx
j0ag+mkUfJ2fWuLrM04QprPtd2PYw5703d95mnrU7t7dmszDt6ldzBE6B7tvl6QB
@TheCloudlessSky
TheCloudlessSky / NhJsonCacheSerializer.cs
Last active June 9, 2016 14:27
JSON.NET implementation of ICacheSerializer for NHibernate.Caches.Redis
// IMPORTANT: This might not be a complete implementation. For example, if you use
// custom NHibernate types, you will have to modify this (e.g. inside of
// CustomContractResolver.CreateObjectContract and maybe writing a custom
// JsonConverter) to support your custom types. You'll want to test this
// implementation with your data and use cases.
public class NhJsonCacheSerializer : ICacheSerializer
{
// By default, JSON.NET will always use Int64/Double when deserializing numbers
// since there isn't an easy way to detect the proper number size. However,
// because NHibernate does casting to the correct number type, it will fail.
@TheCloudlessSky
TheCloudlessSky / win32.py
Last active September 29, 2015 18:21
Datadog WMI Significant Performance Improvements
from wmi_sampler import WMISampler
# Sample Check.
class Check(object):
def __init__(self, logger):
self.logger = logger
class Processes(Check):
using System;
using System.Linq;
using System.Collections.Generic;
using System.Globalization;
using System.Threading.Tasks;
using NHibernate.Cache;
using NHibernate.Util;
using System.Net.Sockets;
using StackExchange.Redis;
using System.Runtime.Caching;
@TheCloudlessSky
TheCloudlessSky / 1
Last active January 16, 2023 15:51
test
Hello
Line 3
Etc..