Skip to content

Instantly share code, notes, and snippets.

bskaggs / extractedLinks.csv
Last active June 5, 2018 20:25
Here are links to Wikipedia articles from Stack Overflow's tag wiki pages extracted from the May 2014 dump. Each link has been name normalized and has had redirects followed, and only valid articles are listed. The format is a CSV file, with triples representing tag name, the wikipedia link found on the tag wiki page, and the fully resovled link…
bskaggs / 01_regex.rb
Last active August 29, 2015 14:06
Create validating regex for tag link urls based on the stackexchange site feed
#!/usr/bin/env ruby
require 'rss'
require 'open-uri'
url = ''
subdomains = []
domains = []
open(url) do |rss|
feed = RSS::Parser.parse(rss, do_validate = false)
bskaggs / index-bottom.html
Created February 28, 2017 04:16
Persistent headers and footers on reveal.js slides
<!--include before initialize block-->
<script src="path/to/jquery.min.js"></script>
<script type="text/javascript">
Reveal.addEventListener( 'ready', function( event ) {
var banners = '<div id="banners"><header \/><footer \/><\/div>';
$('section').each(function (index, slide ) {
if ($(slide).children('section').length == 0) {
var bannerText = $(slide).closest('[data-banner]').data('banner');
if (bannerText) {
var background = $(slide.slideBackgroundElement);
apiVersion: v1
kind: ConfigMap
name: example-calendar
calendar.jobConfig: |-
interval: "60s"
bskaggs / Dockerfile
Last active May 7, 2024 07:24
Install pyarrow on alpine in docker
FROM python:3.7-alpine3.8
RUN apk add --no-cache \
build-base \
cmake \
bash \
jemalloc-dev \
boost-dev \
autoconf \
zlib-dev \
To render a red circle, first mentally CGI encode the following SVG document as a data URL in a markdown image
<svg xmlns="" width="100" height="100" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" stroke="black" stroke-width="3" fill="red" /></svg>
and directly output the following markdown verbatim:
![red circle](data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//
bskaggs / gist:28580431b26ae69212595af73847efa1
Created March 29, 2023 12:25
ChatGPT-4 generated example of how to remove all but two columns from a spreadsheet
To create a macro in Excel for Mac that removes all columns except "Foo Bar" and "Baz Biz", unmerges all cells, and adds a filter to the "Baz Biz" column, you can use the following VBA code:
1. Press F11 or click Tools > Visual Basic to open the Visual Basic for Applications editor.
2. Click Insert > Module to insert a new module.
3. Copy and paste the following VBA code into the module:
Sub FilterAndUnmerge()
Dim ws As Worksheet