Skip to content

Instantly share code, notes, and snippets.

View josharian's full-sized avatar

Josh Bleecher Snyder josharian

View GitHub Profile
package main
import (
"bytes"
"flag"
"fmt"
"os"
"strings"
"github.com/go-clang/v3.9/clang"
package main
import (
"bytes"
"flag"
"fmt"
"os"
"strings"
"github.com/go-clang/v3.9/clang"
@josharian
josharian / issue16122_test.go
Created May 16, 2017 19:15
extract for go issue 16122
/*
Copyright 2011-2013 Frederic Langlet
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
you may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
//go:cgo_ldflag "-g"
//go:cgo_ldflag "-O2"
//go:cgo_ldflag "-L/usr/local/Cellar/glib/2.52.0/lib"
//go:cgo_ldflag "-L/usr/local/opt/gettext/lib"
//go:cgo_ldflag "-lgobject-2.0"
//go:cgo_ldflag "-lglib-2.0"
//go:cgo_ldflag "-lintl"
// Created by cgo - DO NOT EDIT
package glib
$ ./net.test -test.short -test.v
=== RUN TestSortByRFC6724
--- PASS: TestSortByRFC6724 (0.00s)
=== RUN TestRFC6724PolicyTableClassify
--- PASS: TestRFC6724PolicyTableClassify (0.00s)
=== RUN TestRFC6724ClassifyScope
--- PASS: TestRFC6724ClassifyScope (0.00s)
=== RUN TestRFC6724CommonPrefixLength
--- PASS: TestRFC6724CommonPrefixLength (0.00s)
=== RUN TestCgoLookupIP
$ sudo dtruss ./net.test -test.short -test.v
Password:
dtrace: system integrity protection is on, some features will not be available
SYSCALL(args) = return
=== RUN TestSortByRFC6724
--- PASS: TestSortByRFC6724 (0.00s)
=== RUN TestRFC6724PolicyTableClassify
--- PASS: TestRFC6724PolicyTableClassify (0.00s)
=== RUN TestRFC6724ClassifyScope
@josharian
josharian / fo.json
Created February 3, 2017 23:56
field offices
{
"splitDistrict": false,
"normalizedLocation": "San Francisco",
"issues": [{
"id": "recSNuTr4jTAjeCEh",
"name": "Stop the Silencing of Government Scientists",
"reason": "As reported by the Washington post on January 24th, the Trump administration has officially placed a gag-order on scientists at several large national agencies: the Environmental Protection Agency, the National Institute of Health, and the Department of Agriculture. “Trump administration officials instructed employees at multiple agencies in recent days to cease communicating with the public through news releases, official social media accounts and correspondence, raising concerns that federal employees will be able to convey only information that supports the new president’s agenda,” Juliet Eilperin and Brady Dennis of the Washington Post reported. They also imposed a freeze on grants and contracts by the EPA, which could affect the core operations of the agency, from water safety testing to toxic cleanups. \n\nThese gag-orders on
@josharian
josharian / resp.json
Created February 3, 2017 21:47
new 5calls contact info
{
"splitDistrict": false,
"normalizedLocation": "San Francisco",
"issues": [{
"id": "recSNuTr4jTAjeCEh",
"name": "Stop the Silencing of Government Scientists",
"reason": "As reported by the Washington post on January 24th, the Trump administration has officially placed a gag-order on scientists at several large national agencies: the Environmental Protection Agency, the National Institute of Health, and the Department of Agriculture. “Trump administration officials instructed employees at multiple agencies in recent days to cease communicating with the public through news releases, official social media accounts and correspondence, raising concerns that federal employees will be able to convey only information that supports the new president’s agenda,” Juliet Eilperin and Brady Dennis of the Washington Post reported. They also imposed a freeze on grants and contracts by the EPA, which could affect the core operations of the agency, from water safety testing to toxic cleanups. \n\nThese gag-orders on
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package apply
import (
"fmt"
"go/ast"
"reflect"
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package apply
import (
"fmt"
"go/ast"
"reflect"