Skip to content

Instantly share code, notes, and snippets.

@mclark4386
mclark4386 / keybase.md
Created September 9, 2019 19:34
keybase.md

Keybase proof

I hereby claim:

  • I am mclark4386 on github.
  • I am mclark (https://keybase.io/mclark) on keybase.
  • I have a public key ASC2vtl_cDSMWttvntOodYT2ZcevZATaTSljcog2atAvAwo

To claim this, I am signing this object:

@mclark4386
mclark4386 / auto_set_content_type_preware.go
Created April 5, 2018 02:23
This is my pre-ware for buffalo to auto handle .html, .json and .xml
package helpers
import (
"net/http"
"strings"
)
func AutoSetContentType(h http.Handler) http.Handler {
return http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) {
path := strings.ToLower(req.URL.Path)
@mclark4386
mclark4386 / FirstML.py
Created January 11, 2018 00:10
Incomplete, but erroring test of ML
# coding: utf-8
# In[39]:
get_ipython().magic('matplotlib inline')
import matplotlib.pyplot as plt
import numpy as np
np.random.seed(12345)
@mclark4386
mclark4386 / not_working_example.sql
Created December 22, 2017 04:38
not working example
CREATE TABLE "songs" (
"id" UUID PRIMARY KEY,
"title" VARCHAR (255) NOT NULL,
"created_at" timestamp NOT NULL,
"updated_at" timestamp NOT NULL
);
CREATE TABLE "cakes" (
"id" SERIAL PRIMARY KEY,
"int_slice" int[],
"float_slice" numeric[],
@mclark4386
mclark4386 / working_example.sql
Created December 22, 2017 04:36
working example
CREATE TABLE "songs" (
"id" UUID PRIMARY KEY,
"title" VARCHAR (255) NOT NULL,
"created_at" timestamp NOT NULL,
"updated_at" timestamp NOT NULL
);
CREATE TABLE "cakes" (
"id" SERIAL PRIMARY KEY,
"int_slice" int[],
"float_slice" numeric[],
using System;
namespace testUname
{
class MainClass
{
static void Main (string[] args)
{
System.Diagnostics.ProcessStartInfo sinfo = new System.Diagnostics.ProcessStartInfo();
@mclark4386
mclark4386 / Gemfile
Created April 14, 2013 09:15 — forked from thbar/Gemfile
source 'http://rubygems.org'
gem 'rails', '3.2.x'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', "3.2.5"
gem 'coffee-rails', "3.2.2"
gem 'uglifier', '1.2.4'

Welcome to Drift!

Drift is an always-already versioned, cloud-backed text editor. You can use it to take notes, and save them in the GitHub cloud.

Your gists are always saved locally, and any changes you make will get pushed to GitHub's servers.

To name a gist, touch its name in the toolbar.

You can use the share button at the top-right to copy a link to one of your gists, or view it on the web in Safari.

private{
import std.signals, std.stdio, std.typecons;
}
alias Tuple!(float, "x", float, "y") point;
class widget{
void onClick(int button)
{
@mclark4386
mclark4386 / testFactory.d
Created June 8, 2011 20:42
Shows a small example of Object.factory and a slice w/ foreach loop... also use of enforce to give better exception error messages
import std.stdio, std.string, std.exception;
interface tester
{
void print();
}
class bob:tester
{
void print()