Skip to content

Instantly share code, notes, and snippets.

Run go install and

  • gogitlocalstats -add /path/to/folder will scan that folder and its subdirectories for repositories to scan
  • gogitlocalstats -email [email protected] will generate a CLI stats graph representing the last 6 months of activity for the passed email. You can configure the default in main.go, so you can run gogitlocalstats without parameters.

Being able to pass an email as param makes it possible to scan repos for collaborators activity as well.

License: CC BY-SA 4.0

@edipretoro
edipretoro / zotero-rdf-tags.py
Created January 11, 2025 08:57 — forked from rlskoeser/zotero-rdf-tags.py
Python script to generate CSV summary data from a Zotero RDF library export
#! /usr/bin/env python
# simple script to pull data from a Zotero library RDF export
# and generate a CSV file with identifier, type of item, title,
# date, and the number of tags
#
# Only supports book and bookSection item types, all other items are ignored
#
# The CSV file will be generated with the same base name as the
# RDF input file.
@edipretoro
edipretoro / gist:530417e582d5d58aac6b5086cef593fa
Created September 19, 2024 05:56 — forked from prin-underlandscape/gist:7cb81c5b0231c58691a1181da1e7bf67
How to embed dynamic Zotero bibliographies in Google Sites

How to embed dynamic Zotero bibliographies in Google Sites

This document explains how to embed in a Google Sites page a bibliography generated dynamically starting from a Zotero public library. The case of a private library is more complex and is not covered here. This tutorial is based on the official library in [https://www.zotero.org/support/dev/web_api/v3/basics](official documentation).

We cover cases in which embedding does not require javascript code, but just writing a HTTP URL that leverages the API of the Zotero bibliography service. The URL is then embedded into the Google Sites page using the embed button (the one represented by two brackets <>) in the Google Sites graphical user interface. We are using this method to write the bibliography of the https://sites.google.com/view/prin-underlandscape project web site (at draft stage when writing this gist).

Getting the user id and the first API request

The fist operation on our way is to find the User Identifier for

@edipretoro
edipretoro / bootstrap-plugins.txt
Created October 21, 2012 08:42 — forked from mklabs/bootstrap-plugins.txt
h5bp + twitter bootstrap integration
bootstrap-tooltip.js
bootstrap-popover.js
bootstrap-alert.js
bootstrap-button.js
bootstrap-carousel.js
bootstrap-collapse.js
bootstrap-dropdown.js
bootstrap-modal.js
bootstrap-scrollspy.js
bootstrap-tab.js
@edipretoro
edipretoro / comment.pl
Created October 8, 2012 13:46 — forked from anonymous/comment.pl
HTML4 comment parsing issue with Mojo::DOM
#!/usr/bin/env perl
use strict;
use warnings;
use 5.010;
use Mojo::DOM;
use HTML::TreeBuilder;
my $content = <<'EOF';
<html>
<body>
@edipretoro
edipretoro / benchmark.pl
Created October 8, 2012 13:46 — forked from anonymous/benchmark.pl
Simple Mojo::DOM vs HTML::TreeBuilder comparison
#!/usr/bin/env perl
use strict;
use warnings;
use HTML::TreeBuilder;
use Mojo::DOM;
use Benchmark qw(:hireswallclock cmpthese);
use Template;
#! /usr/bin/perl -w
use strict;
use warnings;
use feature 'say';
use Data::Dump;
my %total_bytes;
while (<>) {
my ($source,$destination,$bytes) = split;
#!/usr/bin/perl
# Usage: upgrade-cpan.pl 5.14.0 | sort -u | cpanm
use strict;
use File::Find::Rule;
use JSON;
my $old = shift;
my @files = File::Find::Rule->file->name('install.json')->in("$ENV{HOME}/perl5/perlbrew/perls/perl-$old/lib/site_perl/$old");
for my $file (@files) {
-- CREATE STANDARD TABLES FOR LawDB.db
CREATE TABLE Law (
id integer primary key autoincrement,
content text not null,
lastdate date not null,
presc text
);
CREATE TABLE LawVersion (
lawid integer references Law(id),
@edipretoro
edipretoro / gist:2585815
Created May 3, 2012 13:56 — forked from SebDeclercq/gist:2585720
Error while running populate-db.pl
################ schema.sql ####################
# CREATE TABLE Law (
# id integer primary key,
# title text not null,
# lastdate date not null,
# auth text
# );
# CREATE TABLE LawVersion (
# lawid integer references Law(id),
# numid text primary key not null,