- 更新
2014-11-20
- バージョン
0.0.5
- 作者
@voluntas
- URL
概要
#!python | |
def dict2list(dict1): | |
assert isinstance(dict1,dict) | |
indexes = sorted(dict1.keys()) | |
## try: | |
[ int(xx) for xx in indexes ] # validation: all keys is integer | |
assert indexes[0] == 0 and indexes[-1] == len(indexes)-1, "can not convert to list" | |
return [ dict1[xx] for xx in indexes ] |
#!/bin/bash -x | |
# https://gist.github.com/755352 | |
for DEV in $( mount | awk '{print $1}'|fgrep /dev/ ) | |
do | |
PUREDEV=$( echo $DEV | cut -d/ -f3- ) | |
UUIDIS=$( ls -l /dev/disk/by-uuid/ | fgrep $PUREDEV | awk '{print $8}' ) | |
fgrep $UUIDIS /etc/fstab || ( | |
echo $UUIDIS | |
echo UUID=$UUIDIS $( mount | fgrep $PUREDEV | awk '{print $3,$5}') defaults,noatime 0 0 | sudo tee -a /etc/fstab | |
) |
#!/usr/bin/tclsh | |
# Optimized Version by Samuel Zafrany | |
# Ported from C by Anders Bergh <anders1@gmail.com> | |
package require Tcl 8.4 | |
set BAILOUT 16 | |
set MAX_ITERATIONS 1000 |
#!/usr/bin/perl | |
# Ported from C to Perl by Anders Bergh <anders1@gmail.com> | |
# Some Perlification by John Gabriele (4-24-2007). | |
use strict; | |
use warnings; | |
use Time::HiRes qw( gettimeofday ); | |
my $BAILOUT = 16; | |
my $MAX_ITERATIONS = 1000; |
cfhdojbkjhnklbpkdaibdccddilifddb Adblock Plus 10000000 | |
gighmmpiobklfepjocnamgkkbiglidom AdBlock 10000000 | |
efaidnbmnnnibpcajpcglclefindmkaj Adobe Acrobat 10000000 | |
gomekmidlodglbbmalcneegieacbdmki Avast Online Security 10000000 | |
eofcbnmajmjmplflapaojjnihcjkigck Avast SafePrice 10000000 | |
chfdnecihphmhljaaejmgoiahnihplgn AVG Web TuneUp 10000000 | |
flliilndjeohchalpbbcdekjklbdgfkk Avira Browser Safety 10000000 | |
gpdjojdkbbmdfjfahjcgigfpmkopogic Pin It Button 10000000 | |
lifbcibllhkdhoafpjfnlhfpfgnpldfl Skype 10000000 | |
mallpejgeafdahhflmliiahjdpgbegpk FromDocToPDF 9298905 |
[subrepos] | |
git:allowed=true | |
[web] | |
push_ssl=False | |
allow_push=* |
2014-11-20
0.0.5
@voluntas
概要
= Arch Linux step-by-step installation = | |
= http://blog.fabio.mancinelli.me/2012/12/28/Arch_Linux_on_BTRFS.html = | |
== Boot the installation CD == | |
== Create partition == | |
cfdisk /dev/sda | |
* Create a partition with code 8300 (Linux) |
The Brother PTP300BT label maker is intended to be controlled using the official Brother P-Touch Design & Print iOS/Android app. The app has arbitrary limits on what you can print (1 text object and up to 3 preset icons), so I thought it would be a fun challenge to reverse engineer the protocol to print whatever I wanted.
Python code at the bottom if you want to skip the fine details.
Intitially I had a quick peek at the Android APK to see if there was any useful information inside. The code that handles the communication with the printer in Print&Design turned out to be a native library, but the app clearly prepares a bitmap image and passes it to this native library for printing. Bitmaps are definitely something we can work with.
Country | Alpha-2 code | Alpha-3 code | Numeric code | Latitude (average) | Longitude (average) | |
---|---|---|---|---|---|---|
Afghanistan | AF | AFG | 4 | 33 | 65 | |
Albania | AL | ALB | 8 | 41 | 20 | |
Algeria | DZ | DZA | 12 | 28 | 3 | |
American Samoa | AS | ASM | 16 | -14.3333 | -170 | |
Andorra | AD | AND | 20 | 42.5 | 1.6 | |
Angola | AO | AGO | 24 | -12.5 | 18.5 | |
Anguilla | AI | AIA | 660 | 18.25 | -63.1667 | |
Antarctica | AQ | ATA | 10 | -90 | 0 | |
Antigua and Barbuda | AG | ATG | 28 | 17.05 | -61.8 |