Skip to content

Instantly share code, notes, and snippets.

@denilsonsa
denilsonsa / Demo.md
Last active Jan 10, 2018
Markdown rendering of code block inside nested list
View Demo.md

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
denilsonsa / README.md
Last active Nov 20, 2018
Train Conductor World - tiled map
View README.md

[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
denilsonsa / path_normalize_by_string_manipulation.pl
Last active Aug 15, 2017
How to normalize a path in Perl? (without checking the filesystem)
View path_normalize_by_string_manipulation.pl
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;
# https://stackoverflow.com/questions/45631519/how-to-normalize-a-path-in-perl-without-checking-the-filesystem
my %solutions = (
denilson_answer => sub {
@denilsonsa
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
denilsonsa / moneylog_convert.py
Created Jun 14, 2016
moneylog_convert.py que usei até final de 2014
View moneylog_convert.py
#!/usr/bin/env python2
# -*- coding: utf8 -*-
from __future__ import unicode_literals
import sys
from datetime import date, timedelta
import re
@denilsonsa
denilsonsa / README.md
Last active Mar 30, 2019
Embed VTT subtitles into HTML
View README.md

Objective

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.

Problem

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

@denilsonsa
denilsonsa / README.md
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.
@denilsonsa
denilsonsa / README.md
Last active Oct 1, 2015
Help setting up 2 asymmetrical displays with nvidia GTX 550
View README.md

Posted: http://forum.scssoft.com/viewtopic.php?f=111&t=191979

I'm trying to setup 2 displays with multimon in ETS2, but I'm failing. Well, I've managed to configure the custom multimon layout, but I can't figure out how to make ETS2 window expand to both displays.

My system:

  • Windows 7 64-bit
  • Nvidia GTX 550 Ti
  • Main HDMI monitor at 1920 x 1080
  • Secondary DVI monitor at 800 x 1280
You can’t perform that action at this time.