Skip to content

Instantly share code, notes, and snippets.

View rys's full-sized avatar
🤙
you're great

Rys Sommefeldt rys

🤙
you're great
View GitHub Profile
@rys
rys / gist:80b8c58d57fc227a3fa31d6ca8545c7f
Last active July 17, 2019 11:44
Arch running kernel vs custom AMD DRM staging kernel
ARCH RUNNING KERNEL CUSTOM AMD DRM STAGING KERNEL
# #
# Automatically generated file; DO NOT EDIT. # Automatically generated file; DO NOT EDIT.
# Linux/x86 5.2.1-arch1 Kernel Configuration | # Linux/x86 5.2.0-rc1 Kernel Configuration
# #
# #
# Compiler: gcc (GCC) 9.1.0 # Compiler: gcc (GCC) 9.1.0
# #
@rys
rys / instalist.html
Created February 6, 2018 00:00
Hugo template to list all posts where you used the Instagram shortcode
<ul>
{{ $files := readDir "/content/post" }}
{{ range $file := $files }}
{{ if in .Name ".md" }}
{{ $match := printf "/content/post/%s" .Name | readFile | findRE "{{< instagram" }}
{{ if $match }}
<li><a href="/post/{{ strings.TrimSuffix ".md" .Name }}">{{ strings.TrimSuffix ".md" .Name }}</a></li>
{{ end }}
{{ end }}
{{ end }}
service unifi stop # or whatever you use to stop the controller
cd <path to your UniFi install>/lib
mv snappy-java-1.1.2.6.jar snappy-java-1.1.2.6.jar.orig
ln -s /usr/local/share/java/classes/snappy-java.jar snappy-java-1.1.2.6.jar
service unifi start
[outputs]
home = ["html", "json", "rss"]
{{- $pctx := . -}}
{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
{{- $pages := slice -}}
{{- if or $.IsHome $.IsSection -}}
{{- $pages = $pctx.RegularPages -}}
{{- else -}}
{{- $pages = $pctx.Pages -}}
{{- end -}}
{
"version": "https://jsonfeed.org/version/1.1",
@rys
rys / Beyond3DCUDAThroughputThingy.md
Created May 31, 2016 23:05
Beyond3D CUDA Throughput Thingy

Beyond3D CUDA Throughput Thingy

This tool is designed to run simple kernels that are almost exclusively math instructions, in order to test ALU throughput on compatible CUDA devices.

In particular, it was designed to text FP16 throughput on sm_53 and upwards device architectures, where FP16 support is present. FP16, FP32 and FP64 kernels are run and measured.

The kernels themselves are simple and execute almost nothing more than long chains of dependent FMA instructions, bar some setup at the top of each kernel to setup a thread index, and a small amount of math at the end to consume the results of the FMA chain and write it out to memory.

In the current version, each thread runs a chain 1024 FMAs long, run as 8 loops of 128. For the FP16 and FP32 kernels, 8192x4096 threads are run, split up as blocks run at the maximum number of device threads the hardware reports it can handle. For the FP64 kernels, one quarter of the number of threads are run, to make the test run faster more than anything.

@rys
rys / l2tp-ipsec-edgerouter-x.txt
Created March 11, 2016 21:47
L2TP/IPSec VPN configuration on EdgeRouter X
configure
set vpn ipsec ipsec-interfaces interface eth0 # your WAN interface
set vpn ipsec auto-firewall-nat-exclude enable
set vpn ipsec nat-networks allowed-network 0.0.0.0/0 # check that's OK before you set it
set vpn l2tp remote-access authentication mode local
set vpn l2tp remote-access authentication local-users username <user> password <password>
set vpn l2tp remote-access client-ip-pool start <starting IP>
set vpn l2tp remote-access client-ip-pool stop <end IP>
set vpn l2tp remote-access dns-servers server-1 <DNS server IP>
set vpn l2tp remote-access ipsec-settings authentication mode pre-shared-secret
@rys
rys / he.net-tunnelbroker-setup-edgeos.txt
Last active March 31, 2024 00:22
HE.net Tunnelbroker IPv6 tunnel on EdgeOS
# this assumes WAN is eth0 and LAN is switch0. Please adjust for your own setup
configure
# Tunnel first
edit interfaces tunnel tun0
set encapsulation sit
set local-ip xxx.xxx.xxx.xxx # your WAN IP
set remote-ip xxx.xxx.xxx.xxx # HE.net Server IPv4 Address
set address xxxx:xxxx:xxxx:xxxx::2/64 # Client IPv6 Address

Keybase proof

I hereby claim:

  • I am rys on github.
  • I am rys (https://keybase.io/rys) on keybase.
  • I have a public key whose fingerprint is 445F AF5E 0311 84CD BDB2 C7D9 DBFD 10B8 B8A0 C001

To claim this, I am signing this object:

@rys
rys / id_rsa.pub
Created October 29, 2013 01:04
ssh pubkey
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDEudw9IyLEO/wA78oQNCq0v72CzySoj3SjG+/CQ8YTsrHFu9RNnbJFNRygkVo/L8qGyDSy4lvfc4AgG8fP1BDWq/UxPNlJALmUDI3nPMV0GTE5fnGu10bLb6e7Elru8wk9UMP2JBtSQp7vW5Luo20wpsjI4vjE8ciW3lNOI5c9up8UbENhExtXmxvNA0VExUhNlabfpuRcCc8na6kLdv7G02vuaZnwatUZuXQO3sYPbAUckjuf5J8q5tLcQcP5dOCEC8NphyGU6QVPYSecVFD3I0GMRHaWyh4gayqgp/1Y9CvUx3ULJ4+7ukasS53KzFT1fFa0FgLdIbQPa5wR6cTl rys@sommefeldt