Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
🐝 🐝 🐝 🍯

Mark Thiessen markthiessen

💭
🐝 🐝 🐝 🍯
View GitHub Profile
@markthiessen
markthiessen / simple-css.css
Created Apr 21, 2020
Just some simple css. Nothing to see here.
View simple-css.css
body {
max-width: 800px;
padding: 20px;
}
View keybase.md

Keybase proof

I hereby claim:

  • I am markthiessen on github.
  • I am markthiessen (https://keybase.io/markthiessen) on keybase.
  • I have a public key ASBLl9NY02UvgDCLeI1iXlgYUVYjpxp9oM_GfNoaT_tQUQo

To claim this, I am signing this object:

@markthiessen
markthiessen / inlineConfirm.js
Last active Aug 29, 2015
AngularJS (+Bootstrap) directive for inline ngClick confirmation
View inlineConfirm.js
(function () {
'use strict';
angular.module('yourModule').directive('inlineConfirm',
['$compile',
function ($compile) {
return {
priority: -100,
link: function (scope, elm, attrs) {
var wrapperTemplate = '<div class="popover inline-confirm" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>';
var template =
@markthiessen
markthiessen / DisableSslv3.ps1
Created Oct 20, 2014
PowerShell script for disabling SSLv3 - Refactored
View DisableSslv3.ps1
# MS Security bulletin: https://technet.microsoft.com/en-us/library/security/3009008.aspx
# Azure post where this script originally came from: http://azure.microsoft.com/blog/2014/10/19/how-to-disable-ssl-3-0-in-azure-websites-roles-and-virtual-machines/
#
#
# NOTE: This registry change requires that the server be restarted. The script
# will detect if a change is applied and AUTOMATICALLY reboot the server.
# If you don't want automatic reboot comment out the final section of the
# script before running!
Function Ensure-RegKeyExists {
View PrimeFetcher.cs
public class PrimeFetcher
{
public IEnumerable<int> FetchPrimesUpTo(int max)
{
if (max <= 1)
return Enumerable.Empty<int>();
var range = Enumerable.Range(0, max + 1).ToArray();
range[1] = 0;
@markthiessen
markthiessen / getWeeksInMonth.js
Last active Mar 22, 2022
JavaScript - get weeks in a month as array of start and end days
View getWeeksInMonth.js
//note: month is 0 based, just like Dates in js
function getWeeksInMonth(year, month) {
const weeks = [],
firstDate = new Date(year, month, 1),
lastDate = new Date(year, month + 1, 0),
numDays = lastDate.getDate();
let dayOfWeekCounter = firstDate.getDay();
for (let date = 1; date <= numDays; date++) {