Skip to content

Instantly share code, notes, and snippets.

View Denilsons-keyboard-idea-v2-compact.kbd.json
[
{
"name": "Denilson's keyboard idea v2-compact",
"author": "Denilson"
},
[
"Esc",
{
"x": 0.25
},
View Denilsons-keyboard-idea-v2_1.kbd.json
[
{
"name": "Denilson's keyboard idea v2.1",
"author": "Denilson",
"pcb": false,
"plate": false
},
[
"Esc",
{
@denilsonsa
denilsonsa / migrate_bitbucket_mercurial_to_github.py
Last active Jul 1, 2020
Migrate Bitbucket mercurial repositories to GitHub
View migrate_bitbucket_mercurial_to_github.py
#!/usr/bin/env python3
#
# migrate_bitbucket_mercurial_to_github.py
#
# This is a single-use script to export all my Bitbucket.org mercurial
# repositories into my GitHub. Why? Because:
# https://bitbucket.org/blog/sunsetting-mercurial-support-in-bitbucket
#
# This script has my username hard-coded in the code.
#
@denilsonsa
denilsonsa / humblebundle_downloader.js
Last active May 22, 2020
Humble Bundle downloader
View humblebundle_downloader.js
// This thing can be copy-pasted into the browser devtools JavaScript console, on the following page:
// https://www.humblebundle.com/home/library
// It was written to automatically download all torrent files from my Humble Bundle library.
//
// 1. Open the page.
// 2. Filter by ebooks.
// 3. Select BitTorrent instead of direct download.
// 4. Click on the first product to start downloading.
// 5. Run the code below.
@denilsonsa
denilsonsa / index.html
Last active Aug 6, 2019
getElementsByClassName vs getElementById vs querySelector (http://jsbench.github.io/#6fdcc5a726220a85eb7c6a00e955d532) #jsbench #jsperf
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>getElementsByClassName vs getElementById vs querySelector</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@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 Sep 19, 2020
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
You can’t perform that action at this time.