Skip to content

Instantly share code, notes, and snippets.

View bolinfest's full-sized avatar

Michael Bolin bolinfest

  • Meta
View GitHub Profile
@bolinfest
bolinfest / docbook_to_html.py
Created October 28, 2013 16:51
This is the script that I used to convert Appendix B of Closure: The Definitive Guide from the DocBook XML from the Manuscript to HTML.
import cgi
import re
import xml.dom.minidom
# Omit trailing slash.
HOST = 'http://www.bolinfest.com'
STYLE = """
body {
width: 825px;
@bolinfest
bolinfest / main.c
Created April 22, 2014 22:11
Dump source ranges for diagnostics using libclang.
#include <clang-c/Index.h>
#include <stdio.h>
void parseMalformedFile(char* source) {
CXIndex index = clang_createIndex(
/* excludeDeclarationsFromPCH */ 0,
/* displayDiagnostics */ 0);
const char *args[] = {
"-I/usr/include",
"-I.",
@bolinfest
bolinfest / mojave-build-error.txt
Created July 18, 2019 01:08
./tools/android_build.sh ~/android-ndk-r18b arm &> /tmp/mojave-build-error.txt
rm -f -r out/Makefile node node_g out/Release/node \
out/Release/node.exp
rm -f -r node_modules
rm -f test.tap
# Next one is legacy remove this at some point
rm -f -r test/tmp*
rm -f -r test/.tmp*
/Applications/Xcode_10.2.app/Contents/Developer/usr/bin/make test-addons-clean
rm -f -r test/addons/??_*/
rm -f -r test/addons/*/build
#!/usr/bin/env node
// Run this file to generate initialize.rpc in the same directory.
// Then to test it:
//
// Microsoft.Python.LanguageServer < /Users/mbolin/src/test-lsp/initialize.rpc
//
// Ideally, the LSP would reply on stdout.
const fs = require("fs");
import asyncio
import json
import os.path
from aiogoogle import Aiogoogle
from aiogoogle.auth.creds import ClientCreds, UserCreds
"""Basic Python script that demonstrates programmatic access to GDrive,
though the hard work is jumping through the Google Cloud Console hoops
to get a valid set of credentials to instantiate ClientCreds and UserCreds.