Skip to content

Instantly share code, notes, and snippets.

View alexandre-mbm's full-sized avatar

Alexandre Magno alexandre-mbm

  • Natal (RN), Brazil
View GitHub Profile
@alexandre-mbm
alexandre-mbm / arch-santander.md
Last active December 29, 2015 19:13
Usando Módulo de Proteção do Santander em um sistema Arch Linux

Verificando que não tenho a JRE da Oracle:

$ java -version
openjdk version "1.8.0_66"
OpenJDK Runtime Environment (build 1.8.0_66-b17)
OpenJDK Server VM (build 25.66-b17, mixed mode)

Por isso instalar o módulo de proteção em Java dá erro!

@alexandre-mbm
alexandre-mbm / test-josm-translation.sh
Created December 10, 2015 02:14
Trying to test translation of JOSM's preset
#!/bin/bash
# cp josm/data/pt_BR.lang ./pt_BR.lang-backup # TODO: backup
JOSM_ARGS=-Xmx800M
JOSM_CLASS=org.openstreetmap.josm.gui.MainApplication
JOSM_DIR=josm
JOSM_JAR=/usr/share/java/josm/josm.jar
unzip $JOSM_JAR -d $JOSM_DIR
@alexandre-mbm
alexandre-mbm / README.md
Last active December 9, 2015 01:19
Query helpers for translation of JOSM's presets

The first use was:

$ ./cmp-trans.sh > test.txt

In most cases it will be sufficient to consult test.txt (and last error.txt).

To check differences (if necessary):

@alexandre-mbm
alexandre-mbm / map-sample.py
Created November 12, 2015 19:19
Shows how to map a array in other and creating a dict
words = ['um','dois','três','quatro','cinco']
numbers = [1,2,3]
def maptest(word, number):
return (word, number)
result = dict(map(maptest, words, numbers))
print(result)
@alexandre-mbm
alexandre-mbm / customizing-firefox.md
Last active October 31, 2015 21:57
Treinando customização de Firefox a partir dos tutoriais de mike.kaply.com

Customizing Firefox

  • Default Preference Files
  • Autoconfig Files
  • Autoconfig Files (Continued)
  • Advanced Autoconfig Files
  • distribution.ini
  • Default Profiles
  • Disabling Safe Mode
  • Extensions and the CCK Wizard
@alexandre-mbm
alexandre-mbm / agb-from-agh.py
Last active October 21, 2015 21:53
Python 3 script to encode URL that is on clipboard
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from urllib.parse import quote_plus
# sudo pip install pyperclip
import pyperclip as cb
a = cb.paste()
@alexandre-mbm
alexandre-mbm / README.md
Last active October 20, 2015 03:21
(by guesswork) Accessibility test for the table of choosing of the GitHub's plans

(in portuguese) Isto é um ensaio de HTML básico para alcançar formas de implementar acessebilidade na tabela de escolha de planos de serviço que há durante o cadastro no GitHub. Experimente!

(in english) This is a basic HTML test to achieve ways of implementing accessibility in the table of choice of service plans that there is during the registration on GitHub. Try!!

@alexandre-mbm
alexandre-mbm / README.md
Last active October 11, 2015 21:21
Download do curso de Shell Script montado por Júlio Neves e publicado na Linux Magazine

Para gerar a lista de arquivos a baixar:

bash write.sh > files.txt

Para fazer o download:

wget -c -i files.txt
set old_root=$root
search.fs_uuid 3020b2c2-bdd1-4d60-a8b7-b29b1e4897e6 root hd1,gpt2
if [ $root != $old_root ]; then
set prefix=($root)'/boot/grub'
configfile $prefix/grub.cfg
else
search --fs-uuid --no-floppy --set=root 746E-44FF
chainloader (${root})/EFI/Microsoft/Boot/bootmgfw_BACKUP.efi
boot
fi