Skip to content

Instantly share code, notes, and snippets.

chantra chantra

Block or report user

Report or block chantra

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View strava2garmin.py
#!/usr/bin/env python
# Convert a TCX file exported from strava's export data:
# https://www.strava.com/activities/<activity_id>/export_original
# to a TCX file ready to upload to https://connect.garmin.com/
# This is based on the logic from http://rodemybike.today/strava-to-garmin/
# but I just find it more convenient to:
# ~/strava2garmin.py < strava_activity.tcx > garmin_activity.tcx
# or
# cat strava_activity.tcx | ~/strava2garmin.py > garmin_activity.tcx
View responsewriter.go
package test
import (
"net"
"github.com/coredns/coredns/plugin/test"
"github.com/miekg/dns"
)
// ResponseWriter extends test.ResponseWriter and record useful calls to methods.
View unbound.conf
remote-control:
#control-cert-file: "/etc/unbound/local/unbound_control.pem"
control-enable: yes
control-interface: 127.0.0.1
#control-key-file: "/etc/unbound/local/unbound_control.key"
control-port: 8953
#server-cert-file: "/etc/unbound/local/unbound_server.pem"
#server-key-file: "/etc/unbound/local/unbound_server.key"
control-use-cert: no
View repro.go
package main
import (
"context"
"flag"
"fmt"
"log"
"math/rand"
"net"
"os"
View dot.lua
-- Module interface
local ffi = require('ffi')
local basexx = require('basexx')
local C = ffi.C
-- Export module interface
local M = {}
M.layer = {}
local base32 = {}
View cb.diff
diff --git a/test/test_knownservers.py b/test/test_knownservers.py
index e53c0d0..3470432 100644
--- a/test/test_knownservers.py
+++ b/test/test_knownservers.py
@@ -28,9 +28,7 @@ def known_servers():
# Name, Domain, endpoint
('Google', 'dns.google.com', '/experimental'),
('Cloudflare', 'cloudflare-dns.com', '/dns-query'),
- # Not supporting draft-13?
- # Received b'{DoH-server}: Error x09: Request not valid
View cb.diff
diff --git a/test/test_knownservers.py b/test/test_knownservers.py
index e53c0d0..19bde9d 100644
--- a/test/test_knownservers.py
+++ b/test/test_knownservers.py
@@ -30,7 +30,7 @@ def known_servers():
('Cloudflare', 'cloudflare-dns.com', '/dns-query'),
# Not supporting draft-13?
# Received b'{DoH-server}: Error x09: Request not valid
- # ('CleanBrowsing', 'doh.cleanbrowsing.org', '/doh/family-filter'),
+ ('CleanBrowsing', 'doh.cleanbrowsing.org', '/doh/family-filter/'),
View soreuseport.go
package main
import (
"fmt"
"syscall"
"runtime"
)
func main() {
fmt.Printf("Version: %s\nGOOS: %s\nGOARCH: %s\n", runtime.Version(), runtime.GOOS, runtime.GOARCH)
View a.diff
diff --git a/plugin/pkg/edns/edns.go b/plugin/pkg/edns/edns.go
index 3f0ea5e1..c058a411 100644
--- a/plugin/pkg/edns/edns.go
+++ b/plugin/pkg/edns/edns.go
@@ -28,8 +28,8 @@ func Version(req *dns.Msg) (*dns.Msg, error) {
o.Hdr.Name = "."
o.Hdr.Rrtype = dns.TypeOPT
o.SetVersion(0)
- o.SetExtendedRcode(dns.RcodeBadVers)
m.Extra = []dns.RR{o}
View reflect_soreuseport.diff
diff --git a/reflect/reflect.go b/reflect/reflect.go
index 2baa4b3..5d0953e 100644
--- a/reflect/reflect.go
+++ b/reflect/reflect.go
@@ -38,6 +38,7 @@ import (
"net"
"os"
"os/signal"
+ "runtime"
"runtime/pprof"
You can’t perform that action at this time.