Skip to content

Instantly share code, notes, and snippets.

View mlh758's full-sized avatar

Michael Harris mlh758

  • Fountain
  • Kansas City
  • 05:49 (UTC -05:00)
View GitHub Profile
@mlh758
mlh758 / bootstrap.htm
Last active March 9, 2018 15:39
Extra Demos
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>Jumbotron Template for Bootstrap</title>
@mlh758
mlh758 / bug-report.rb
Created April 9, 2018 20:04
ActiveRecord Primary Key Test Case
# frozen_string_literal: true
begin
require "bundler/inline"
rescue LoadError => e
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
raise e
end
gemfile(true) do
@mlh758
mlh758 / main.go
Created December 21, 2018 19:01
Minimum Test Case
package main
import (
"encoding/json"
"log"
)
const j = `{
"expectation": "Verbalizes understanding",
"description": "Home Medication Administration Plan",
@mlh758
mlh758 / flat_trace.txt
Created February 13, 2019 15:39
Rails console deadlock traces
Thread 7 (Thread 0x1e03 of process 83525):
#0 0x00007fffa9884bf2 in ?? () from /usr/lib/system/libsystem_kernel.dylib
#1 0x00007fffa99707fa in _pthread_cond_wait () from /usr/lib/system/libsystem_pthread.dylib
#2 0x000000010f943e1a in native_sleep ()
#3 0x000000010f944f37 in rb_thread_sleep_forever ()
#4 0x000000010f8c4517 in rb_f_sleep ()
#5 0x000000010f98c61e in vm_call_cfunc ()
#6 0x000000010f975a44 in vm_exec_core ()
#7 0x000000010f986eee in vm_exec ()
#8 0x000000010f9941c4 in invoke_block_from_c_bh ()
@mlh758
mlh758 / magefile.go
Last active April 3, 2019 20:45
FFI Segfaulting
// +build mage
package main
import (
"fmt"
"os"
"os/exec"
"github.com/magefile/mage/mg"
@mlh758
mlh758 / go.mod
Last active June 19, 2019 20:32
Go Excelize Perf Test
module github.com/mlh758/exc_test
go 1.12
require github.com/360EntSecGroup-Skylar/excelize v1.4.1
@mlh758
mlh758 / excel.go
Created April 12, 2019 20:29
Excelize Interface
package excel
import (
"fmt"
"io"
"github.com/360EntSecGroup-Skylar/excelize"
)
type File interface {
@mlh758
mlh758 / Dockerfile
Last active July 11, 2019 16:37
rsyslog Docker Build
FROM centos:6.8
ARG SYSLOG_VERSION=8.1905.0
RUN yum install -y wget libestr-devel libtool autoconf automake zlib-devel libcurl-devel gcc \
bison flex make
# Libfastjson
WORKDIR /home/libfastjson
RUN wget https://github.com/rsyslog/libfastjson/archive/v0.99.8.tar.gz
RUN tar xzf v0.99.8.tar.gz
@mlh758
mlh758 / file_test.go
Created October 29, 2019 17:31
Excelize Save Benchmark
package excelize
import (
"testing"
)
func BenchmarkWrite(b *testing.B) {
const s = "This is test data"
for i := 0; i < b.N; i++ {
f := NewFile()
@mlh758
mlh758 / main.go
Created January 6, 2020 17:23
Excel Delete SheetID Example
package main
import (
"fmt"
"github.com/360EntSecGroup-Skylar/excelize/v2"
)
func main() {
xlsx := excelize.NewFile()