Skip to content

Instantly share code, notes, and snippets.

View gdalgas's full-sized avatar

Geoff Dalgas gdalgas

View GitHub Profile
Select
(Select SUM(VoterRepChange)
From Posts2Votes v
Where UserId = @Id
And VoteTypeId = 1) as AskerAcceptsAnswer,
(Select SUM(-VoterRepChange)
From Posts2Votes v
Where UserId = @Id
And DeletionDate Is Not Null
And VoteTypeId = 1) as AskerUnacceptsAnswer,
@gdalgas
gdalgas / gist:2372262
Created April 13, 2012 00:27
Test Gist
string upgrade_file
= new StreamReader(Assembly.GetExecutingAssembly().GetManifestResourceStream(
Assembly.GetExecutingAssembly().GetName().Name
+ ".schemas.template.db_upgrades.txt")
).ReadToEnd();
var a += 1;
@gdalgas
gdalgas / gist:168f9e1fc1c966ddc4419da78694dba7
Created January 3, 2017 00:12
Christmas Tree Lights 2016
#include <IRremote.h>
#include "FastLED.h"
FASTLED_USING_NAMESPACE
// FastLED "100-lines-of-code" demo reel, showing just a few
// of the kinds of animation patterns you can quickly and easily
// compose using FastLED.

Keybase proof

I hereby claim:

  • I am gdalgas on github.
  • I am gdalgas (https://keybase.io/gdalgas) on keybase.
  • I have a public key whose fingerprint is 0413 B99B D3D2 1AB4 BE3A A2DD B0B0 5E2E CFA8 1CDD

To claim this, I am signing this object:

function importCSVFromGmail() {
var threads = GmailApp.search("redacted");
var message = threads[0].getMessages().pop();
var attachment = message.getAttachments()[0];
if (attachment != null) {
var attachName = attachment.getName();
// Is the attachment a CSV file
@gdalgas
gdalgas / mathjax-editing.js
Last active April 1, 2023 08:10
StackExchange MathJax editing code
// The MIT License (MIT)
//
// Copyright (c) 2016 Stack Exchange
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions: