Skip to content

Instantly share code, notes, and snippets.

Avatar

Matthijs Kooijman matthijskooijman

View GitHub Profile
View gist:3b894413f89b18e708a44f07bdc92a8d
matthijs@tika:~$ lsmod | grep -i conntrack
nf_conntrack_netlink 49152 0
xt_conntrack 16384 244
nf_conntrack_ftp 20480 1 nf_nat_ftp
nf_conntrack 172032 9 xt_conntrack,nf_nat,nf_nat_ftp,xt_state,nf_nat_ipv4,xt_nat,nf_conntrack_netlink,xt_connmark,nf_conntrack_ftp
nf_defrag_ipv6 20480 1 nf_conntrack
nf_defrag_ipv4 16384 1 nf_conntrack
nfnetlink 16384 6 nft_compat,nf_conntrack_netlink,nf_tables,nfnetlink_log
x_tables 45056 14 xt_conntrack,iptable_filter,nft_compat,xt_multiport,xt_NFLOG,xt_state,xt_tcpudp,xt_nat,ipt_REJECT,xt_connmark,ip_tables,xt_limit,ip6t_REJECT,iptable_mangle
libcrc32c 16384 4 nf_conntrack,nf_nat,dm_persistent_data,raid456
View Eventix sort tickets in shop.js
var authz = 'Insert value of Authorization header here'
var url = 'https://api.eventix.io/3.0.0/shop/' + new URLSearchParams(window.location.search).get('editing');
function fetch_tickets() {return fetch(new Request(url + '/tickets', {'headers': {'Authorization': authz}})).then(response => response.json())}
function order_tickets(a, b) {return fetch(new Request(url + '/tickets/reorder', {'headers': {'Authorization': authz, 'Content-Type': 'application/json;charset=UTF-8'}, 'body': JSON.stringify({'predecessor': a.guid, 'successor': b.guid}), 'method': 'PUT'}))}
async function sort() {tickets = await fetch_tickets(); tickets.sort((a, b) => a.name.localeCompare(b.name)); for (let i = 0; i < tickets.length - 1; ++i) { await order_tickets(tickets[i], tickets[tickets.length-1])}}
sort()
// Note: Printing fetch_tickets afterwards is not helpful, as the returned list is not sorted itself
View arm_asm_spi.cpp
// Put this function in RAM to prevent any unpredictable latency from
// loading instructions from flash.
byte BB_SPITransfer (byte c) __attribute__((section(".ramfunc")));
byte BB_SPITransfer (byte c)
{
// Number of cycles between writes to SCK (excluding one SCK write
// but including the other). These counts do not include the delay
// loops. The movs before the delay loop is also not counted,
// since it compensates for the missing cycle on the last branch
// in the delay loop (when it is *not* taken). Note that the PORT
View gist:0ea492468b5b878c3fd39110bde4f33d
#AIOWPS_LOGIN_WHITELIST_START
<FilesMatch "^(wp-login\.php)">
<IfModule !mod_authz_core.c>
Order Allow,Deny
Allow from www.fablabamersfoort.nl
Allow from 37.97.157.192
Allow from 145.130.146.23
Allow from 82.161.203.30
</IfModule>
<IfModule mod_authz_core.c>
View foo.md

image

This suggests that the arrow up/down symbol is indeed Schmitt Trigger, and not indicates push-pull (from the TLP2745 datasheet):

image

View Report.md

Testcase:

$ cat log.ir 
declare double    @llvm.log.f64(double %Val)

define double @foo() {
start:
  %0 = call double @llvm.log.f64(double 1.024000e+03) #8
  %1 = call double @llvm.log.f64(double 2.000000e+00) #8
  %2 = fdiv double %0, %1
View debdiff.diff
diff -Nru llvm-toolchain-7-7.0.1/debian/changelog llvm-toolchain-7-7.0.1/debian/changelog
--- llvm-toolchain-7-7.0.1/debian/changelog 2019-02-28 13:50:21.000000000 +0100
+++ llvm-toolchain-7-7.0.1/debian/changelog 2019-03-11 23:51:24.000000000 +0100
@@ -1,3 +1,41 @@
+llvm-toolchain-7 (1:7.0.1-8+rpi1) buster-staging; urgency=medium
+
+ [changes brought forward from llvm-toolchain-3.8 1:3.8-2+rpi1 by Peter Michael Green <plugwash@raspbian.org> at Sat, 14 May 2016 21:43:35 +0000]
+ * Cleanup .pyc files in clean target.
+ * Add a hack to the cmake based build to force armv6 (unfortunately the cmake
+ based build relies on config.guess which assumes you want to build for the
View PrintFormat.cpp
#include <Arduino.h>
using namespace Formatters;
template <typename T>
inline void debug_type(const T&) __attribute__((deprecated));
template <typename T>
inline void debug_type() __attribute__((deprecated));
View go mod graph after upgrade
github.com/3devo/dvconnector github.com/DataDog/zstd@v1.3.8
github.com/3devo/dvconnector github.com/Sereal/Sereal@v0.0.0-20190409170602-963d7e218945
github.com/3devo/dvconnector github.com/asdine/storm@v2.1.2+incompatible
github.com/3devo/dvconnector github.com/bob-thomas/configdir@v0.0.0-20181219095810-37a1c27b6286
github.com/3devo/dvconnector github.com/bob-thomas/go-serial@v0.0.0-20180319113759-0f9c45f81e71
github.com/3devo/dvconnector github.com/boltdb/bolt@v1.3.1
github.com/3devo/dvconnector github.com/coreos/etcd@v3.3.12+incompatible
github.com/3devo/dvconnector github.com/coreos/go-semver@v0.3.0
github.com/3devo/dvconnector github.com/creack/goselect@v0.0.0-20180501195510-58854f77ee8d
github.com/3devo/dvconnector github.com/dgrijalva/jwt-go@v3.2.0+incompatible
You can’t perform that action at this time.