Skip to content

Instantly share code, notes, and snippets.

View lightonphiri's full-sized avatar

Lighton Phiri lightonphiri

View GitHub Profile
@benmarwick
benmarwick / gdoc-revisions-analysis.R
Last active October 31, 2022 18:51
How to get access to specific revisions (and details about it) of a google drive document? cf. https://github.com/tidyverse/googledrive/issues/218
# related to my question here: https://github.com/tidyverse/googledrive/issues/218
# How to get access to specific revisions of a google drive document? Yes, we can do that.
# How to get the username for each revision, and the size of the document at each revision (bytes or words, assuming we are specifically talking about docs and not sheets or other types of files) Yes, we can do that.
# Goal is to measure the contributions of each author to a collaboratively-authored google doc with as little work as possible
# How to get access to specific revisions of a google drive document?
# Getting the revisions for a Google Doc
@JustinShenk
JustinShenk / draftback.txt
Created December 12, 2017 12:40
Analyze Google Docs user contributions and activity
Span Duration User # Revisions
Sat, 9/30/2017, 12:56:47 PM - 1:00:18 PM 00:03:31s Justin Shenk 372
Sat, 9/30/2017, 1:16:02 PM - 1:29:42 PM 00:13:40s Justin Shenk 1136
Sat, 9/30/2017, 1:45:20 PM - 2:19:19 PM 00:33:59s Justin Shenk 948
Sat, 9/30/2017, 4:28:13 PM - 4:29:14 PM 00:01:00s 06287517911256457317 38
Sat, 9/30/2017, 4:44:12 PM - 5:03:57 PM 00:19:44s Justin Shenk 750
Sat, 9/30/2017, 8:34:08 PM - 8:40:02 PM 00:05:54s Justin Shenk 42
Sat, 9/30/2017, 8:48:53 PM - 9:11:03 PM 00:22:10s 06287517911256457317 1204
Sat, 9/30/2017, 9:11:04 PM - 9:11:04 PM 00:00:00s Justin Shenk 2
Sat, 9/30/2017, 9:11:04 PM - 9:11:07 PM 00:00:03s 06287517911256457317 6
@eulereadgbe
eulereadgbe / asfa.xslt
Last active October 20, 2019 17:54
XSLT to transform ASFA Thesaurus to DSpace controlled vocabulary
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output omit-xml-declaration="yes" indent="yes"/>
<xsl:strip-space elements="*"/>
<xsl:key name="kConcByCode" match="CONCEPT" use="DESCRIPTOR"/>
<xsl:key name="useFor" match="CONCEPT" use="NON-DESCRIPTOR"/>
<xsl:template match="/">
<node id="ASFA" label="ASFA Thesaurus">
<isComposedBy>
@lightonphiri
lightonphiri / bash-install_google_fonts_on_ubuntu.md
Last active May 8, 2024 17:14
Install Google Fonts on Ubuntu

Install Google Fonts

Download desired fonts

https://fonts.google.com/?selection.family=Open+Sans

Install Google Fonts on Ubuntu

cd /usr/share/fonts
sudo mkdir googlefonts
cd googlefonts
sudo unzip -d . ~/Downloads/Open_Sans.zip

@jiaxu825
jiaxu825 / pandocHeader
Last active March 14, 2024 20:42
A Pandoc YAML metadata block for compilling Markdown to pretty PDF via latex
---
title:
author:
date:
documentclass:
- scrartcl
header-includes:
- \usepackage{paralist}
- \usepackage{booktabs}
- \usepackage{numprint, xspace, paralist}
@nateware
nateware / make_favicon.sh
Last active April 8, 2024 05:48
Imagemagick to create favicon.ico with 16x16 and 32x32 sizes in it
# IE is still braindead so still use favicon.ico
convert -resize x16 -gravity center -crop 16x16+0+0 -flatten -colors 256 input.png output-16x16.ico
convert -resize x32 -gravity center -crop 32x32+0+0 -flatten -colors 256 input.png output-32x32.ico
convert output-16x16.ico output-32x32.ico favicon.ico
# Then, HTML needs to specify size="XxY" as largest size due to browser bugs
<link rel="shortcut icon" href="/favicon.ico" sizes="32x32">
@tilusnet
tilusnet / parse_toc.py
Last active March 2, 2020 10:13 — forked from sakti/parse_toc.py
#!/usr/bin/env python
# parse_toc.py
from pdfminer.pdfparser import PDFParser
from pdfminer.pdfdocument import PDFDocument
def parse(filename, maxlevel):
fp = open(filename, 'rb')
parser = PDFParser(fp)
doc = PDFDocument(parser)
@aponxi
aponxi / sql-mongo_comparison.md
Last active February 21, 2024 11:56
MongoDb Cheat Sheets

SQL to MongoDB Mapping Chart

SQL to MongoDB Mapping Chart

In addition to the charts that follow, you might want to consider the Frequently Asked Questions section for a selection of common questions about MongoDB.

Executables

The following table presents the MySQL/Oracle executables and the corresponding MongoDB executables.

@pitch-gist
pitch-gist / gist:2999707
Created June 26, 2012 22:21
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>