Class War

The New Class War Good overview of the Managerial Class vs. The Rest, effect of peace amongst major powers, corporate overreach.

Share

Pass password manager

https://files.dyne.org/tomb/
cd Downloads
tar xvfz Tomb-2.4.tar.gz
cd Tomb-2.4
sudo make install
sudo apt-get install cryptsetup zsh

git clone https://github.com/roddhjav/pass-tomb/
cd pass-tomb
sudo make install

  • Tomb commands
    sudo tomb dig -s 10 mytomb
    sudo tomb forge mytomb.key
    sudo tomb lock mytomb -k mytomb.key

sudo tomb -f lock mytomb -k mytomb.key
sudo tomb -f open mytomb -k mytomb.key

tomb close
tomb slam all

tomb is found at /media/mytomb

~/.bashrc

export PASSWORD_STORE_GENERATED_LENGTH=16
export PASSWORD_STORE_DIR=/home/mbc/syncd/.password-store
export PASSWORD_STORE_ENABLE_EXTENSIONS=true
export PASSWORD_STORE_TOMB_FILE=/home/mbc/syncd/.password.tomb
export PASSWORD_STORE_TOMB_KEY=/home/mbc/syncd/.password.key.tomb

Other

When you see “-bash: ‘\r’: command not found” run dos2unix on the file.
caution s dos2unix modifies in place

Usage

  • Start with annotation; also use this if the password already exists, it will not modify first line, or leaves first line blank if it already exists
    pass insert -m twitter

  • Add password; -i will not overwrite annotation
    pass generate -n -i mbc/twitter 16

  • View
    pass show twitter
    pass show -c

  • Find
    pass find .com

  • Edit
    pass edit mbc/twitter

By convention leave all file names lower case

To make nano the default editor (useful for pass edit):

sudo update-alternatives –config editor

When presented with the editor list choose /bin/nano (“1”)

Share

Debian 9.0 / Surface Pro 3.0

Installation of Debian 9.0 on a Surface Pro 3.0. I started by following the directions here, but had to improvise as my surface had been upgraded to Windows 10.

Prepare USBs

Prepare two USB drives with the necessary iso images. To determine name of the USB port:

1
blkid -o list -c /dev/null

Download the Debian 9.0 image from https://www.debian.org/distrib/netinst and copy to the USB.

1
dd if=debian-9.0.0-amd64-netinst.iso  of=/dev/sdb

Download firmware from https://cdimage.debian.org/cdimage/unofficial/non-free/cd-including-firmware/current/amd64/iso-cd/

1
dd if=firmware-9.0.0-amd64-netinst.iso of=/dev/sdb

Prepare Surface

The first thing I did was save my recovery partition to a USB drive. I then shrunk the windows partition by right clicking on the C:\ drive in the Disk Management software. Once shrunk, open a command window and disable hibernation.

1
powercfg -hibernate off

Turn the Surface off. Turn it back on and repeately press the ESC key during startup. This will take you to the harware setup window, where you can disable Secure Boot. If you have the bitlocker key, select that option and turn off encryption. Bitlocker will prevent booting into Windows if Secure Boot is turned off. Change the boot device order here selecting USB –> SSD. Shut down the Surface.

Gather hardware

You will need a USB hub so that both iso containing USBs can be plugged in simultaneously. I found that my Displaylink docking station served the purpose. However when I plug in the docking station, the Surface keypad no longer works. I had to plug a USB keyboard into the Displaylink to navigate through the installation.

Installation

Start up the Surface. At the Bitlocker screen select “Skip this drive” which will redirect you to the USB and start the Debian installation. Debian 9.0 retrieves the Wifi driver (and maybe other drivers) from the firmware iso without prompts. The most difficult part of the installation was the SSD partitioning. I was presenting with multiple partitions, one of which was empty space at 53.5GB. I reduced this partition to 53GB and used the 0.5GB for the boot partition. I also set up a swap space.

Though I use Xfce as my window manager, I selected Gnome for the Surface for its tablet support. I did not need any further configuration. Files were downloaded as needed. I rebooted when prompted and went right into Grub. Touchpad, keyboard, wifi, camera are all working.

Next I installed software of interest and deleted a lot of crapware installed by default with Gnome.

1
2
3
4
5

# apt-get install conkeror thunderbird emacs ess guile-2.0 curl calibre sudo pass chromium rsync referencer nodejs electrum flashplugin-nonfree xournal x11-server-utils
# apt-get remove gnome-games gnome-calendar gnome-clocks gnome-weather inkscape polari evolution
# apt-get install gnome-core
# apt autoremove

configure browser favorites, mail, electrum seed, conkeror with instapaper,

Copy over ~/.gnupg, ~/.ssh ~/.mutt

Pen info

https://www.reddit.com/r/SurfaceLinux/comments/40ftek/how_to_get_ubuntu_gnome_working_almostperfectly/

References

http://winaero.com/blog/how-to-install-linux-on-surface-pro-3/

https://github.com/jimdigriz/debian-mssp4

Troubleshooting

Ctrl-Alt-F5 to get to a terminal

sudo chmod 1777 /tmp to fix correct password rejection problem

substitute lightdm for gdm3 for circular login problem (didn’t work on HP desktop debian 10)

Share

Growing up and being useful is the new counterculture

To find meaning in life take on responsibility rather than demand rights.

Share

Travel

Travel as an alternative to boredom induced alcoholism.

Too many people want to travel

Travel is not worth it

Travel photos

Travel photos are underrated

Share

Dotbitme

View a .bit domain

To view a .bit domain you need to update your browser with the dotbitme plugin. More information also at dotbitme and meowbit. Namecoin client available here.

Register and set up a .bit domain

I am using Hostgator as my hosting service.

Namecoin

  1. Claim and configure .bit address with the Namecoin client

  2. Configure the domain using nameservers as I don’t have a dedicated IP address

Hostgator

  1. create add-on domain ‘public_html/lostnation.bit’

    • all content goes under this domain
    • (I put it under public_html/lostnation.bit)
  2. Redirect any .net name to this .bit directory

    • redirect lostnat.net -> lostnation.bit/lnsDFoKytr
    • redirect lostnation.bit -> lostnation.bit
  3. create ftp account for uploading files

Hexo _config.yaml

/# Deployment
/#/# Docs: https://hexo.io/docs/deployment.html
deploy:
type: ftpsync
host: mydomain.net
user: lnsDFoKytr@lostnation.bit
pass: mypass
remote: /
port:
ignore:
connections:
verbose: true

Buy a hot domain name: crispr.bit

The other day I was reading an article about the transfer and potential worth of the crispr.com domain name and wondered “is crispr.bit available?” I fired up my Namecoin client and lo and behold it was! I claimed both crispr.bit and crisprcas9.bit. If you arrived at this page, dear Reader, because you typed crispr.bit in your browser, wondering “is crispr.bit for sale?” - yes indeed it is. $100,000 for either crispr.bit or crisprcas9.bit or a whopping 25% discount - $150,000 - for both. If you are interested, do the following:

  1. Transfer $100,000 or $150,000 worth of Bitcoin to my wallet ID 18Vvgw9bNmpwwH4pWJ646YAFVa3n6TXSfS. For your convenience a QR code is on my about page.

  2. After 6 confirmations send me an email at mbcladwell@gmail.com including your Namecoin wallet ID and the domain name you are interested in.

  3. Using the Namecoin client I will transfer the domain to you.

  4. Thank you. It was a pleasure doing business.

Share

Behavioral epistasis

A recent paper Social Epistasis Amplifies the Fitness Costs of Deleterious Mutations, Engendering Rapid Fitness Decline Among Modernized Populations provides a mathematical model to show the effects of behaviour of a subpopulation (carriers with behavioral mutations) on the total population. I was interested in playing with the parameters and so created a shiny app that would allow me to do so.

Assume co-mingling of a wild type population pop1 with a carrier population pop2. pop2 has deleterious behavioural mutation(s) that affect pop1 via social epistasis. Example behaviors that might have a negative impact on the population might be extreme altruism or free riding. The following equations from the paper describe the population growth of the two intermixed populations.

Population 1 (wild type) growth rate: $$pop1_{t+1} - pop1_t = (1 - p_{12})*birthrate1(pop1_t, pop2_t)*pop1_t - deathrate1*pop1_t$$ Population 2 (carrier) growth rate: $$pop2_{t+1} - pop2_t = birthrate2 * pop2_t - deathrate2 * pop2_t + p_{12} * birthrate1(pop1_t,pop2_t) * pop1_t$$ Birth rate of population 1: $$birthrate1(pop1_t, pop2_t) = birthsmax1* \frac{pop1_t}{pop1_t + pop2_t}$$

To convert this to R code I utilize a vector indexed by the variable i which will represent the flow of time in generations. pop1[1] is the first generation, pop[2] the second etc. and more generally pop1[i] is followed by pop[i+1]. Likewise birthrate1, which is population size dependent, will be indexed by i, with a potentially unique value for each generation.

Start by defining variables and setting their values to the defaults used in the paper. pop 1 and 2 will be vectors

1
2
3
4
5
6
7
8
9
10
11
12
13

birthrate2 <- 1
birthsmax1 <- 1.7 ##maximum birth rate
deathrate1 <- 1
deathrate2 <- 1.2
gens <- 30 ##number of generations
p12 <- 0.2 ##proportion of carrier births

pop1 <- vector( mode="integer", length=gens) ## wild type
pop2 <- vector( mode="integer", length=gens) ## carriers
birthrate1 <- vector( mode="integer", length=gens)
pop1[1] <- 10 ##initial starting population

Loop over the generations, adjusting population sizes and birthrate1’s value, which is population size dependent.

1
2
3
4
5
6
7

for( i in 1:(gens-1)){
birthrate1[i] <- birthsmax1*( pop1[i]/(pop1[i] + pop2[i]))
pop1[i+1] <- ((1 - p12)*birthrate1[i]*pop1[i] - deathrate1*pop1[i]) + pop1[i] ###wild type
pop2[i+1] <- birthrate2*pop2[i] - deathrate2*pop2[i] + p12*birthrate1[i]*pop1[i] + pop2[i] ##carriers
}

Then plot

1
2
3
4
5
6
7
8

plot(1:gens, pop1, type="l", xlab="Generation", ylab="Population size", main="Assess mutation load")
points(1:gens, pop2, type="l", col="red")
legend(x = 0.75*par("usr")[2], y = 0.75*par("usr")[4],
legend = c("Wild type","Carrier"),
col = c("black","red"),
pch=16)

I would like to make this a Shiny app where I can dynamically change the variables and see the effect in the plot. Take the constants and wrap them into a reactive function. Here is server.R:

server.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53

shinyServer(function(input, output) {

p12func <- reactive({
input$slider1
})
br1maxfunc <- reactive({
input$slider2
})
br2func <- reactive({
input$slider3
})
dr1func <- reactive({
input$slider4
})

dr2func <- reactive({
input$slider5
})
genfunc <- reactive({
input$slider6
})

output$plot1 <- renderPlot({

birthrate2 <- br2func() ## 1
birthsmax1 <- br1maxfunc() ##1.7 maximum birth rate
deathrate1 <- dr1func() ##default 1
deathrate2 <- dr2func() ##1.2
gens <- genfunc() ##30 number of generations
p12 <- p12func() ##proportion of carrier births

pop1 <- vector( mode="integer", length=gens) ## wild type
pop2 <- vector( mode="integer", length=gens) ## carriers

pop1[1] <- 10
birthrate1 <- vector( mode="integer", length=gens)

for( i in 1:(gens-1)){
birthrate1[i] <- birthsmax1*( pop1[i]/(pop1[i] + pop2[i]))
pop1[i+1] <- ((1 - p12)*birthrate1[i]*pop1[i] - deathrate1*pop1[i]) + pop1[i] ###wild type
pop2[i+1] <- birthrate2*pop2[i] - deathrate2*pop2[i] + p12*birthrate1[i]*pop1[i] + pop2[i] ##carriers
}

plot(1:gens, pop1, type="l", xlab="Generation", ylab="Population size", main="Assess mutation load",ylim=c(0, max(max(pop1),max(pop2))))
points(1:gens, pop2, type="l", col="red")
legend(x = 0.75*par("usr")[2], y = 0.75*par("usr")[4],
legend = c("Wild type","Carrier"),
col = c("black","red"),
pch=16)
})
})

And the interface:

ui.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
shinyUI(fluidPage(

title = "Assess mutation load",

plotOutput('plot1'),

hr(),

fluidRow(
column(3,
h4("General"),
sliderInput("slider1", label = h3("Proportion of carrier births"), min = 0, max = 1, step=0.1, value = 0.2),
sliderInput("slider6", label = h3("Number of generations"), min = 10, max = 100, value = 30, step=10)

),
column(4, offset = 1,
h4("Population 1 - Wild type"),
sliderInput("slider2", label = h3("Pop1 max birth rate"), min = 1, max = 3, value = 1.7, step=0.1),
sliderInput("slider4", label = h3("Pop1 death rate"), min = 1, max = 3, value = 1, step=0.1)


),
column(4,
h4("Population 2 - carriers"),
sliderInput("slider3", label = h3("Pop2 birth rate"), min = 1, max = 3, value = 1, step=0.1),
sliderInput("slider5", label = h3("Pop2 death rate"), min = 1, max = 3, value = 1.2, step=0.1)
)
)
))


Here is a reproduction of Figure 1 from the paper:

Here is the app on shinyapps.io. There is a monthly limit of free hours on shinyapps.io so you may have to come back if I have surpassed my limit.

Here is John Tooby with some commentary on purifying selection.

Ethnocentrism dominates humanitarianism.

Share