Skip to content

Instantly share code, notes, and snippets.

View lloyd's full-sized avatar

Lloyd Hilaiel lloyd

View GitHub Profile
@lloyd
lloyd / mapvslice_test.go
Created July 19, 2017 09:03
maps vs slices for mapping small sets of ordinals to values
package whatever
import (
"testing"
)
func BenchmarkMapConstruction(b *testing.B) {
space := make([]map[int][]string, b.N)
for n := 0; n < b.N; n++ {
space[n] = map[int][]string{
idealization
illumination
illustration
immoderation
immunization
imperfection
implantation
impregnation
inactivation
inauguration
1. put <file> on sdcard
2. put sdcard in device
3. reboot and hold down up arrow and power for 10s.
4. "apply update from external storage" - select <file>
5. "wipe data/factory reset"
6. reboot
Now you've got an unrooted phone. Let's install a su binary that gives us root.
1. download root-zte-open.zip (md5 cecc15bd0cc315633d066d81b44d7732)
#!/usr/bin/env dash
# arguments
section='epel-debuginfo'
key='gpgcheck'
value='0'
state="absent"
file="./epel.repo"
separator="="
@lloyd
lloyd / assertion sizes.txt
Created December 20, 2013 10:44
assertion sizes
(format: idp key algorithm / user key algorithm / size in bytes)
New formats:
RS/64 RS/64 612
RS/64 RS/128 811
RS/64 RS/256 1210
RS/64 DS/128 1199
RS/64 DS/256 1937
RS/128 RS/64 698
RS/128 RS/128 897
$ bin/load_gen -u 1/10000 -m 1100000 -a include_only -s http://127.0.0.1:10002
with 1100000 active users there will be:
2.25 signup activites per second
0.45 reset_pass activites per second
0.90 add_email activites per second
1.80 reauth activites per second
100.98 signin activites per second
391.29 include_only activites per second
0.23 change_pass activites per second
11.36 interaction_data activites per second
$ bin/load_gen -u 1/10000 -m 1100000 -a include_only -s http://127.0.0.1:10002
with 1100000 active users there will be:
2.25 signup activites per second
0.45 reset_pass activites per second
0.90 add_email activites per second
1.80 reauth activites per second
100.98 signin activites per second
391.29 include_only activites per second
0.23 change_pass activites per second
11.36 interaction_data activites per second
Average active users simulated over the last 1s/5s/60s:
[994ms] 0.00 0.00 0.00 46 R, 46 S (0sp 0rs 0al 0rh 11sn 32iy 0cs 3ia)
[769ms] 99360.00 99360.00 99360.00 46 R, 46 S (0sp 0rs 0al 0rh 6sn 38iy 0cs 2ia)
[634ms] 99360.00 99360.00 99360.00 46 R, 46 S (0sp 0rs 0al 1rh 11sn 34iy 0cs 0ia)
[494ms] 99360.00 99360.00 99360.00 47 R, 47 S (1sp 0rs 1al 0rh 9sn 34iy 0cs 2ia)
[374ms] 101520.00 99900.00 99900.00 46 R, 46 S (2sp 0rs 0al 0rh 8sn 36iy 0cs 0ia)
[296ms] 99360.00 99792.00 99792.00 47 R, 47 S (0sp 0rs 0al 0rh 12sn 35iy 0cs 0ia)
[240ms] 101621.52 100157.90 100096.92 46 R, 46 S (0sp 0rs 0al 1rh 8sn 36iy 0cs 1ia)
[205ms] 99459.36 100018.20 100005.84 46 R, 46 S (0sp 0rs 0al 0rh 5sn 41iy 0cs 0ia)
[179ms] 99360.00 99886.56 99925.11 46 R, 46 S (1sp 0rs 0al 0rh 8sn 32iy 0cs 5ia)
$ bin/browserid-lookup.js -f login.persona.org -v gmail.com
debug: fetching well-known from gmail.com for principal gmail.com
elapsed_time.fetch_well_known.error: 119
debug: fetching well-known from login.persona.org for principal gmail.com
elapsed_time.fetch_well_known.success: 1875
debug: login.persona.org delegates to gmail.login.persona.org
debug: fetching well-known from gmail.login.persona.org for principal gmail.com
elapsed_time.fetch_well_known.success: 3455
$ bin/browserid-lookup.js -f login.persona.org -v gmail.com
debug: fetching well-known from gmail.com for principal gmail.com
elapsed_time.fetch_well_known.error: 41
debug: fetching well-known from login.persona.org for principal gmail.com
elapsed_time.fetch_well_known.success: 971
debug: login.persona.org delegates to gmail.login.persona.org
debug: fetching well-known from gmail.login.persona.org for principal gmail.com
elapsed_time.fetch_well_known.success: 569