Skip to content

Instantly share code, notes, and snippets.


Patrick DeVivo patrickdevivo

View GitHub Profile
View commits_by_email_domain.sql
substr(author_email, instr(author_email, '@')+1) AS email_domain --
FROM commits
WHERE parent_count < 2 -- ignore merge commits
GROUP BY email_domain
ORDER BY count(*) DESC
patrickdevivo /
Last active Oct 7, 2020
Contributor email domain distributions

Contributors by Email Domain

AskGit is a tool looking for more (interesting) use cases. This gist takes a look at the email domains of contributors to two major open source code bases (Linux and Kubernetes). askgit-query.sql can be piped into the askgit command to produce the output in k8s-SHA.txt and linux-SHA.txt

  • Commit Count is the total number of commits by contributors with an email address from Domain
  • Unique Emails is the number of unique contributors with an email from Domain
  • Domain is the email domain

Using gitqlite, query for percentage of commit count by author (in this case in facebook/react). Limit to top 25, include a "chart"

View tux_todo.txt
dGGGGMMb ,""""""""""""""""""""""""""""".
@p~qp~~qMb | // TODO make this better 🎉 |
M|@||@) M| _;.............................'
@,----.JM| -'
JS^\__/ qKL
dZP qKRb
dZP qKKb
View deno-hello-world.ts
const names = ["world", "patrick", "deno", "adhoc"]
names.forEach(n => console.log(`hello, ${n}!`))
patrickdevivo / b
Created Nov 2, 2017
blockstack verify
View b
Verifying my Blockstack ID is secured with the address 1NKAeaGUag7tpGxpy6unSrAWRZhXJe5JQx
patrickdevivo / 0_reuse_code.js
Created Oct 18, 2013
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
patrickdevivo / fib.asm
Created Nov 3, 2012
Fibonacci sequencer in assembly
View fib.asm
;;; Fibonacci Sequence
SA 0x80
SA 0x00
STOR %rB %rA ; set F(0)=0
SA 0x81
View sum-array.asm
;;; Sum an array
;; Load 0 (where iterator initializes) into %rB
SA 0x01
;; Load n (length of array, also number of iterations when summing the array) into %rA
cond: LLAC n
COPY %rD ; %rD = &n
LOAD %rA %rD ; %rA = n
csv = require 'csv'
_ = require 'underscore'
Table = require 'cli-table'
class Class
constructor: (@code, @sect, @title, @teacher, @room, @capacity, @grade) ->
classes = {}
schedule = {
M: [[], [], [], [], [], [], [], []] # DAY: period[classess[]]