Skip to content

Instantly share code, notes, and snippets.

View mrcampbell's full-sized avatar

Mike Campbell mrcampbell

  • Divvy
  • Northern Utah
View GitHub Profile
@mrcampbell
mrcampbell / HttpMethods.go
Created January 17, 2019 04:36
Scratch Pad for Everything Go
package main
// http://polyglot.ninja/golang-making-http-requests/
/**
* NOTES:
* Always close the response Body
* Always use a timeout:
```
timeout := time.Duration(5 * time.Second)
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global.jsPDF = factory());
}(this, (function () { 'use strict';
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
return typeof obj;
} : function (obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
* {
color: blue !important;
}
console.log('updated 2');
/**
* html2pdf.js v0.9.0
* Copyright (c) 2018 Erik Koopmans
* Released under the MIT License.
*/
!function(A,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):A.html2pdf=t()}(this,function(){"use strict";function A(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function t(A){return A&&A.__esModule&&Object.prototype.hasOwnProperty.call(A,"default")?A.default:A}function e(A,t){return t={exports:{}},A(t,t.exports),t.exports}var n="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},r=(e(function(t,e){t.exports=function(){function t(A){return"function"==typeof A}function e(){var A=setTimeout;return function(){return A(r,1)}}function r(){for(var A=0;A<v;A+=2){var t=T[A],e=T[A+1];t(e),T[A]=void 0,T[A+1]=void 0}v=0}function i(A,t){var e=arguments,n=this,r=new this.constructor(a);void 0===r[N]&&w(r);var i=n._state;return i?
@mrcampbell
mrcampbell / index.ejs
Created January 19, 2018 21:04
Lunch and Learn Node.js Example
<!-- ./views/index.ejs -->
<h2><%- title %></h2>
<p>Welcome to my website!</p>
using System;
using System.Collections.Generic;
using System.Linq;
namespace SyncableTest
{
class MainClass
{
/// <summary>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ExceptionHandlingExample
{
using System;
<?php
echo "Hello World!";
function sendPushOverDebug($title, $message)
{
echo <<<END
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script>
var data = {
'token' : 'TOKEN',
@mrcampbell
mrcampbell / Book.cs
Created May 22, 2017 04:39
Demonstration of C# Object Inheritance
using System;
// The sealed keyword enables you to prevent the inheritance of a class or certain class members
// that were previously marked virtual.
public sealed class Book : Publication
{
/*
The first constructor uses the this keyword to call the other constructor.
This is a common pattern in defining constructors; constructors with fewer parameters
@mrcampbell
mrcampbell / index.html
Created May 8, 2017 18:53
Basic demonstration of an Async REST call for a friend.
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
<!-- Latest compiled and minified JavaScript -->