Skip to content

Instantly share code, notes, and snippets.

@angrysoft
angrysoft / blueEnable_ALARM_non_mainline.md
Created March 6, 2020 17:14 — forked from shenghaoyang/blueEnable_ALARM_non_mainline.md
Bluetooth support on Raspberry Pis running Arch Linux ARM with non-mainline kernel.

Enabling bluetooth

[Pi 3B (Non-Plus) / Pi Zero W ONLY]

As of kernel package, linux-raspberrypi-4.14.59-1, support for notifying the kernel of the Broadcom bluetooth device through the device tree has been enabled.

There is no longer a need for btattach, which makes the lives of everyone easier. There is also no need to fall back to hciattach for better performance, as the

@cgpu
cgpu / KaplanMeierPlotR.R
Created October 24, 2019 18:46 — forked from nbremer/KaplanMeierPlotR.R
Creating a Kaplan Meier plot, used in Survival Analysis, using R's ggplot2 package
#' Create a Kaplan-Meier plot using ggplot2
#'
#' @param sfit: a survfit object
#' @param table: logical: Create a table graphic below the K-M plot, indicating at-risk numbers?
#' @param returns logical: if TRUE, return an arrangeGrob object
#' @param xlabs: x-axis label
#' @param ylabs: y-axis label
#' @param ystratalabs: The strata labels. Default = levels(summary(sfit)$strata)
#' @param ystrataname: The legend name. Default = "Strata"
#' @param timeby numeric: control the granularity along the time-axis
@hgn
hgn / tcpdump IPv6 router advertisement
Created March 16, 2015 18:59
Capture of IPv6 advertisement message via tcpdump
@virgo:~ $ sudo tcpdump -vvvv -ttt -i eth1 icmp6 and 'ip6[40] = 134'
00:00:00.000000 IP6 (hlim 255, next-header ICMPv6 (58) payload length: 200) fe80::b675:eff:fefa:1cb > ip6-allnodes: [icmp6 sum ok] ICMP6, router advertisement, length 200
hop limit 0, Flags [managed, other stateful], pref medium, router lifetime 1800s, reachable time 0s, retrans time 0s
source link-address option (1), length 8 (1): b4:75:0e:fa:01:cb
0x0000: b475 0efa 01cb
mtu option (5), length 8 (1): 1280
0x0000: 0000 0000 0500
prefix info option (3), length 32 (4): 2a01:ffff:43f::/64, Flags [onlink, auto], valid time 7200s, pref. time 1800s
0x0000: 40c0 0000 1c20 0000 0708 0000 0000 2a01
0x0010: ffff 043f 0000 0000 0000 0000 0000
@nutterb
nutterb / missingSummary.R
Last active March 7, 2023 21:47
Generate a Report of Fields with Missing Values in a REDCap Database Using the redcapAPI package
#### Intended for use with the `redcapAPI` package
#' @name missingSummary
#' @aliases missingSummary.redcapApiConnection
#' @aliases missingSummary.redcapDbConneciton
#' @aliases missingSummary_offline
#' @export missingSummary
#' @export missingSummary.redcapApiConnection
#' @export missingSummary.redcapDbConnection
#' @export missingSummary_offline
#'