Skip to content

Instantly share code, notes, and snippets.

Denilson Sá Maia denilsonsa

Block or report user

Report or block denilsonsa

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
denilsonsa / index.html
Last active Aug 6, 2019
getElementsByClassName vs getElementById vs querySelector ( #jsbench #jsperf
View index.html
<!DOCTYPE html>
<meta charset="utf-8"/>
<title>getElementsByClassName vs getElementById vs querySelector</title>
<script src=""></script>
<script src="./suite.js"></script>
<h1>Open the console to view the results</h1>
denilsonsa /
Last active Jan 10, 2018
Markdown rendering of code block inside nested list

Demonstration of a bug in GitLab's Markdown rendering.

I have a nested list, and a code block in the middle of the list.

  1. Numbered list
    • Nested list

        Code block inside the nested list
        This code block works fine.
denilsonsa /
Last active Nov 20, 2018
Train Conductor World - tiled map

[Train Conductor World][tcw] is mobile game (for [iOS][ios] and [Android][and]) by [The Voxel Agents][tva]. The game has several cities on a world map (currently, only European cities).

This project (i.e. this GitHub Gist) is an effort to replicate the game world map outside the game. For that, I've used [Tiled Map Editor][tiled] to rebuild the map, and [Gimp][gimp] to create the graphics. This map can be used in the future to help planning in-game routes.

The graphics are based on [in-game screenshots][ss]. The graphics can be redone in a better quality by someone with better drawing skills.

denilsonsa /
Last active Aug 15, 2017
How to normalize a path in Perl? (without checking the filesystem)
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;
my %solutions = (
denilson_answer => sub {
denilsonsa / 9verdades1mentira.ipynb
Last active Apr 22, 2017
9 verdades e 1 mentira, testadas usando pythonlogica
View 9verdades1mentira.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
denilsonsa /
Created Jun 14, 2016 que usei até final de 2014
#!/usr/bin/env python2
# -*- coding: utf8 -*-
from __future__ import unicode_literals
import sys
from datetime import date, timedelta
import re
denilsonsa /
Last active Jul 7, 2019
Embed VTT subtitles into HTML


I have a video file on my local disk. I also have some subtitles (in HTML5's [WebVTT][] format).

I want to create an HTML file to play that video with subtitles, all from the local filesystem.


Loading an external VTT file from the local filesystem [fails due to same-origin policy][q].

denilsonsa /
Last active Mar 20, 2016
Videosub hack to play embedded .SRT subtitles in HTML5 video
View Python and C ctypes stdout captured in IPython Notebook.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
You can’t perform that action at this time.