Skip to content

Instantly share code, notes, and snippets.

from subprocess import Popen, PIPE, call
import logging
import logging.handlers
import sys
import os
# NOTE: this script assumes a debian system and requires the wmctrl and xdotool packages
# sudo apt-get install wmctrl xdotool
# NOTE: To get [Alt + ` ]to register on Elementary OS requires removing the keybinding via dconf editor for switch-group/switch-group-backward
//Enable two page view in google docs
var newWidth = document.getElementsByClassName('kix-zoomdocumentplugin-outer')[0].style.width.replace('px','') *2 +10 +'px';
document.getElementsByClassName("kix-paginateddocumentplugin")[0].style.width = newWidth;
var pages = document.getElementsByClassName("kix-page");
for (var i = 0; i < pages.length; i++) {
if(i==0) {
pages[0].parentNode.width = newWidth;
}
pages[i].style.float = "left";
# python cedula_uruguaya.py
{“data”: [“\”tag0x1\”:\”MIS APELLIDOS\””, “\”tag0x3\”:\”MIS NOMBRES\””, “\”tag0x4\”:\”URY\””, “\”tag0x5\”:\”01121999\””, “\”tag0x6\”:\”MONTEVIDEO/URY\””, “\”tag0x7\”:\”1234567\””]}
#!/usr/bin/python
import hashlib, sys, time, json
from smartcard.CardType import ATRCardType, AnyCardType
from smartcard.CardRequest import CardRequest
from smartcard.CardConnection import CardConnection
from smartcard.util import toHexString, toBytes
action = error = userpin = stringhash = False
GET_RESPONSE = [0x00, 0xB0]
#!/usr/bin/python
import json
from smartcard.CardType import ATRCardType
from smartcard.CardRequest import CardRequest
from smartcard.CardConnection import CardConnection
from smartcard.util import toBytes
action = error = False
jsonarr = []
# Establezco los comandos APDU utilizados en el documento de identidad uruguayo, estos datos se encuentran en la documentacion ofrecida por AGESIC:
@gazambuja
gazambuja / designer.html
Last active August 29, 2015 14:06
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<polymer-element name="my-element">
<template>
<style>
#core_header_panel {
width: 300px;
@gazambuja
gazambuja / designer.html
Last active August 29, 2015 14:06
designer
<link rel="import" href="../topeka-elements/category-icons.html">
<link rel="import" href="../core-icon/core-icon.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
@gazambuja
gazambuja / designer.html
Last active August 29, 2015 14:06
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<polymer-element name="my-element">
<template>
<style>
#core_header_panel {
width: 100%;