Skip to content

Instantly share code, notes, and snippets.

View aaronolds's full-sized avatar

Aaron.Olds aaronolds

  • Michigan
View GitHub Profile
@gummiforweb
gummiforweb / slack-cleaner.js
Last active August 12, 2022 11:51 — forked from firatkucuk/delete-slack-messages.js
Clean up your Slack messages or files from either public channel, private channel, private message or group message. Fully interactive.
/**
* User Defined Values
*/
const agreedDisclaimer = false;
const apiToken = '';
/**
* Dont need to touch anything below
*/
const readline = require('readline');
@bobbygrace
bobbygrace / trello-css-guide.md
Last active May 15, 2024 16:01
Trello CSS Guide

Hello, visitors! If you want an updated version of this styleguide in repo form with tons of real-life examples… check out Trellisheets! https://github.com/trello/trellisheets


Trello CSS Guide

“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”

You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?

@dieseltravis
dieseltravis / CryptoHelper.cs
Last active October 31, 2023 07:26
sample app that uses PGP Encryption using Bouncy Castle's C# API
// Assembly BouncyCastle.Crypto, Version=1.8.1.0
using Org.BouncyCastle.Bcpg;
using Org.BouncyCastle.Bcpg.OpenPgp;
using Org.BouncyCastle.Security;
using System;
using System.IO;
using System.Text;
namespace EncryptionSample
{
@jogleasonjr
jogleasonjr / SlackClient.cs
Last active October 20, 2023 15:54
A simple C# class to post messages to a Slack channel. You must have the Incoming WebHooks Integration enabled. This class uses the Newtonsoft Json.NET serializer available via NuGet. Scroll down for an example test method and a LinqPad snippet. Enjoy!
using Newtonsoft.Json;
using System;
using System.Collections.Specialized;
using System.Net;
using System.Text;
//A simple C# class to post messages to a Slack channel
//Note: This class uses the Newtonsoft Json.NET serializer available via NuGet
public class SlackClient
{
@afreeland
afreeland / gist:6796800
Last active August 19, 2022 13:58
C#: Reflection - Get Property Type, Switch on Type, Set Property Value
public static void SetKey<T>(T obj, TempDataDictionary _tempData)
{
System.Type type = typeof(T);
// Get our Foreign Key that we want to maintain
String foreignKey = _tempData["ForeignKey"].ToString();
// If we do not have a Foreign Key, we do not need to set a property
if (String.IsNullOrEmpty(foreignKey))
return;
@jasongaylord
jasongaylord / IEUserAgentTest.html
Last active October 10, 2023 08:04
A sample JavaScript file to detect IE compatibility mode and version. This is not recommended unless absolutely needed as features should be detected instead.
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Testing IE Compatibility Mode</title>
<script src="ieUserAgent.js" type="text/javascript"></script>
</head>
<body>
<div id="results">Results:</div>
<script type="text/javascript">
var val = "IE" + ieUserAgent.version;
@mshafrir
mshafrir / states_hash.json
Created May 9, 2012 17:05
US states in JSON form
{
"AL": "Alabama",
"AK": "Alaska",
"AS": "American Samoa",
"AZ": "Arizona",
"AR": "Arkansas",
"CA": "California",
"CO": "Colorado",
"CT": "Connecticut",
"DE": "Delaware",