Skip to content

Instantly share code, notes, and snippets.

View git-recent
#!/bin/bash
read -r -d '' AWK <<EOF
{
date=\$1;
refname=\$2;
subject=substr(\$3,1,72);
sha=\$4;
len=split(refname, ref, "/");
View test_12063689.sql
DROP TABLE tempA; CREATE TABLE tempA ( style_cd CHAR(3), id_cd VARCHAR(15) );
DROP TABLE tempB; CREATE TABLE tempB ( item_desc VARCHAR(50), item_num CHAR(4), style_cd CHAR(3), id_cd VARCHAR(15) );
INSERT INTO tempA
SELECT 'A', 123456
UNION SELECT 'A', 654321
UNION SELECT 'B', 321456
UNION SELECT 'A', 654123
UNION SELECT 'C', 424242;
@johnweldon
johnweldon / read_xlsx.cs
Created Oct 9, 2012
Read Excel .xlsx file and return first worksheet as a DataTable
View read_xlsx.cs
using System.Data;
using System.Data.OleDb;
using System.Diagnostics;
namespace JW4.DB.Util
{
public static class Excel
{
public static DataTable GetFirstWorksheetAsTable(string filename)
{
View synmon-prod-2016.04.08-14.00.04.log.txt
-------------------- Starting drone test 1 ------------------------
TRACE 2016/04/08 14:00:04 synmon.go:130: Starting task id 1 Login Test for iteration 0
TRACE 2016/04/08 14:00:04 drone.go:35: Start Drone Login Test
TRACE 2016/04/08 14:00:04 drone.go:44: Successfully got current user: syntheticmonitortool@gmail.com
TRACE 2016/04/08 14:00:04 drone.go:45: {"remote":"","login":"syntheticmonitor","name":"","email":"syntheticmonitortool@gmail.com","gravatar":"","admin":false,"active":true,"syncing":false,"created_at":0,"updated_at":0,"token":""}
TRACE 2016/04/08 14:00:04 util.go:96: file(2016.04.08/synmon-prod-2016.04.08-14.00.04.log) url() errorstring()
14:00 | Login Test | ID: 1 | 19.365907ms | | 👍 OK
INFO 2016/04/08 14:00:05 util.go:184: Task Info:
Task Status: Ok
@johnweldon
johnweldon / debug.go
Created Apr 26, 2016
Useful http debugging file. Replaces http.DefaultTransport with a logger of all http traffic.
View debug.go
package main
import (
"fmt"
"io"
"net/http"
"net/http/httputil"
"os"
)
View keybase.md

Keybase proof

I hereby claim:

  • I am johnweldon on github.
  • I am johnweldon (https://keybase.io/johnweldon) on keybase.
  • I have a public key whose fingerprint is 77E9 1E85 501D 0B6A 476D 9B39 9CF9 AF9D 7956 0500

To claim this, I am signing this object:

View crash.log
2016/10/24 23:09:18 [INFO] Terraform version: 0.7.7
2016/10/24 23:09:18 [INFO] CLI args: []string{"/usr/local/Cellar/terraform/0.7.7/bin/terraform", "state", "show"}
2016/10/24 23:09:18 [DEBUG] Detected home directory from env var: /Users/weldon
2016/10/24 23:09:18 [DEBUG] Detected home directory from env var: /Users/weldon
2016/10/24 23:09:18 [DEBUG] Attempting to open CLI config file: /Users/weldon/.terraformrc
2016/10/24 23:09:18 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2016/10/24 23:09:18 [DEBUG] Detected home directory from env var: /Users/weldon
2016/10/24 23:09:18 [TRACE] Preserving existing state lineage "bd67628c-5cf1-46c6-adb0-036a829b75e1"
2016/10/24 23:09:18 [TRACE] Preserving existing state lineage "bd67628c-5cf1-46c6-adb0-036a829b75e1"
2016/10/24 23:09:18 [DEBUG] plugin: waiting for all plugin processes to complete...
View exception.txt
13-Mar-2018 15:19:18.744 INFO [http://stage.cacurrent.net/rest/job] org.apache.catalina.core.ApplicationContext.log RestletServlet: [Restlet] ServerServlet: component class is null
13-Mar-2018 17:01:18.624 SEVERE [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class [org.xwiki.container.servlet.XWikiServletContextListener]
java.lang.ClassCastException: org.xwiki.environment.internal.StandardEnvironment cannot be cast to org.xwiki.environment.internal.ServletEnvironment
at org.xwiki.container.servlet.XWikiServletContextListener.contextInitialized(XWikiServletContextListener.java:85)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4579)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5041)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catal
View cockroachdb.log
I180424 16:39:13.856009 536 storage/replica_proposal.go:201 [n19,s19,r242/11:/System/tsd/cr.node.sql.mem.i…] new range lease repl=(n19,s19):11 seq=0 start=1524587953.736138066,0 epo=1 pro=1524587953.736143165,0 following repl=(n3,s3):3 seq=0 start=1524587574.540002243,0 epo=76 pro=1524587574.540011887,0
W180424 16:39:14.715525 533 storage/engine/rocksdb.go:1755 batch [2/525/0] commit took 616.868363ms (>500ms):
goroutine 533 [running]:
runtime/debug.Stack(0x5df6f67, 0xed27154b2, 0x0)
/usr/local/go/src/runtime/debug/stack.go:24 +0xa7
github.com/cockroachdb/cockroach/pkg/storage/engine.(*rocksDBBatch).commitInternal(0xc428057200, 0x0, 0x0, 0x0)
/go/src/github.com/cockroachdb/cockroach/pkg/storage/engine/rocksdb.go:1756 +0x128
github.com/cockroachdb/cockroach/pkg/storage/engine.(*rocksDBBatch).Commit(0xc428057200, 0xed2715401, 0x0, 0x0)
/go/src/github.com/cockroachdb/cockroach/pkg/storage/engine/rocksdb.go:1679 +0x6fe
github.com/cockroachdb/cockroach/pkg/storage.(*Replica).handleRaftRea
View npm_audit_report
=== npm audit security report ===
┌──────────────────────────────────────────────────────────────────────────────┐
│ Manual Review │
│ Some vulnerabilities require your attention to resolve │
│ │
│ Visit https://go.npm.me/audit-guide for additional guidance │
└──────────────────────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
You can’t perform that action at this time.