Skip to content

Instantly share code, notes, and snippets.

View zkamvar's full-sized avatar

Zhian N. Kamvar zkamvar

View GitHub Profile
killercup / pandoc.css
Created July 3, 2013 11:31
Add this to your Pandoc HTML documents using `--css pandoc.css` to make them look more awesome. (Tested with Markdown and LaTeX.)
View pandoc.css
* I add this to html files generated with pandoc.
html {
font-size: 100%;
overflow-y: scroll;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
bastman /
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see:

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

View how to screencapture and make animated gifs or

Screencapture and animated gifs

I say "animated gif" but in reality I think it's irresponsible to be serving "real" GIF files to people now. You should be serving gfy's, gifv's, webm, mp4s, whatever. They're a fraction of the filesize making it easier for you to deliver high fidelity, full color animation very quickly, especially on bad mobile connections. (But I suppose if you're just doing this for small audiences (like bug reporting), then LICEcap is a good solution).

Capturing (Easy)

  1. Launch quicktime player
  2. do Screen recording

screen shot 2014-10-22 at 11 16 23 am

hadley /
Created March 13, 2015 18:49
My advise on what you need to do to become a data scientist...

If you were to give recommendations to your "little brother/sister" on things that they need to do to become a data scientist, what would those things be?

I think the "Data Science Venn Diagram" ( is a great place to start. You need three things to be a good data scientist:

  • Statistical knowledge
  • Programming/hacking skills
  • Domain expertise

Statistical knowledge

ericclemmons /
Last active November 8, 2023 18:03
HTML5 <details> in GitHub

Using <details> in GitHub

Suppose you're opening an issue and there's a lot noisey logs that may be useful.

Rather than wrecking readability, wrap it in a <details> tag!

 Summary Goes Here
emilyriederer / ugliest-ggplot-theme.R
Last active May 11, 2023 06:35
A very, very ugly ggplot2 to demonstrate the wide variety of ggplot2 theme() options
View ugliest-ggplot-theme.R
# sample data for plot ----
points <-
x = rep(1:10,3),
y = rep(1:10,3),
z = sort(rep(letters[1:2], 15)),
w = rep(letters[3:4], 15)
# ggplot using many theme options ----
View pick-your-poison.R
msg <- function(..., prob = 0.25) {
if (runif(1) > prob) {
messages <- c(...)
message(sample(messages, 1))
encourage <- function() {
junioryauricasa / index.html
Created December 9, 2017 19:14
table style css - Tablas estilo EXCEL
View index.html
<html xmlns="">
<link rel="stylesheet" type="text/css" href="excel-2000.css"/>
<link rel="stylesheet" type="text/css" href="excel-xp.css"/>
<link rel="stylesheet" type="text/css" href="excel-2003.css"/>
<link rel="stylesheet" type="text/css" href="excel-2007.css"/>
<script lang="javascript">
johnslemmer / index.html
Last active June 9, 2022 17:45
Wordle (copy of source code on 2022.01.31 just in case the NYTimes fucks it up)
View index.html
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
<title>Wordle - A daily word game</title>
<meta name="description" content="Guess the hidden word in 6 tries. A new puzzle is available each day.">
<!-- FB Meta Tags -->
jrsmith3 /
Last active May 4, 2022 22:17
Python method to access DOI bibtex metadata resolver
import requests
def doi2bib(doi):
Return a bibTeX string of metadata for a given DOI.
url = "" + doi
headers = {"accept": "application/x-bibtex"}