Browse Source

pushing to gitea

Gogs 2 years ago
parent
commit
0afcd3f228
100 changed files with 541 additions and 11 deletions
  1. BIN
      IMG/img1.jpg
  2. BIN
      IMG/img2.jpg
  3. BIN
      IMG/img3.jpg
  4. BIN
      IMG/key1.jpg
  5. BIN
      IMG/key2.jpg
  6. BIN
      IMG/layout2cropped.png
  7. 0
    0
      LICENSE.md
  8. 0
    0
      README.md
  9. 6
    4
      _config.yml
  10. 14
    0
      _data/menu.yml
  11. 0
    0
      _includes/footer.html
  12. 0
    0
      _includes/head.html
  13. 1
    1
      _includes/header.html
  14. 0
    0
      _layouts/default.html
  15. 1
    1
      _layouts/page.html
  16. 0
    0
      _layouts/post.html
  17. 0
    0
      _posts/2015-07-07-not-our-department.md
  18. 0
    0
      _posts/2015-09-08-how-i-solve-my-cube.md
  19. 3
    3
      _posts/2016-04-14-one-of-my-favorite-integrals.md
  20. 36
    0
      _posts/2016-07-06-bc-is-a-terrible-calculator.md
  21. 191
    0
      _posts/2018-01-01-chromebook-pixel-arch-linux.md
  22. 194
    0
      _posts/2018-01-19-math-keyboard.md
  23. 23
    0
      _posts/earth-round.md
  24. 70
    0
      _posts/laptop-review-draft.md
  25. 0
    0
      art/IMG/0RDRCcF.png
  26. 0
    0
      art/IMG/2XSAyJd.png
  27. 0
    0
      art/IMG/39vccUW.png
  28. 0
    0
      art/IMG/5kz8ALP.gif
  29. 0
    0
      art/IMG/85JbIrp.png
  30. 0
    0
      art/IMG/Apr1ehA.png
  31. 0
    0
      art/IMG/BsyZSeN.png
  32. 0
    0
      art/IMG/DHsueEA.jpg
  33. 0
    0
      art/IMG/DcgI0el.png
  34. 0
    0
      art/IMG/EE73Xgo.jpg
  35. 0
    0
      art/IMG/Eri6bRs.gif
  36. 0
    0
      art/IMG/GDFnV6j.gif
  37. 0
    0
      art/IMG/HOx95ki.png
  38. 0
    0
      art/IMG/HqUNw22.gif
  39. 0
    0
      art/IMG/Jpy9HR4.gif
  40. 0
    0
      art/IMG/M50A4q6.png
  41. BIN
      art/IMG/SCOUT.png
  42. 0
    0
      art/IMG/Snapchat-8383819522267284680.jpg
  43. 0
    0
      art/IMG/VqClh5B.gif
  44. 0
    0
      art/IMG/bRAxUjI.png
  45. BIN
      art/IMG/blessed_camera.JPG
  46. 0
    0
      art/IMG/dMzt71u.png
  47. 0
    0
      art/IMG/eggGL.png
  48. 0
    0
      art/IMG/fMMLDkW.png
  49. 0
    0
      art/IMG/fnH1IU7.png
  50. 0
    0
      art/IMG/groJcSL.png
  51. 0
    0
      art/IMG/halftone_heartbeat_by_ibayibay1-d6xe9rf.gif
  52. 0
    0
      art/IMG/ima_0ab8af9.jpeg
  53. 0
    0
      art/IMG/ima_40dc802.jpeg
  54. 0
    0
      art/IMG/ima_53780fd.jpeg
  55. 0
    0
      art/IMG/ima_5c20507.jpeg
  56. 0
    0
      art/IMG/ima_640b6ae.jpeg
  57. 0
    0
      art/IMG/ima_6891122.jpeg
  58. 0
    0
      art/IMG/ima_9732c6a.jpeg
  59. 0
    0
      art/IMG/ima_cb81ce3.jpeg
  60. 0
    0
      art/IMG/ima_e7f5340.jpeg
  61. 0
    0
      art/IMG/ima_fb15143.jpeg
  62. 0
    0
      art/IMG/jxCi2Sd.gif
  63. BIN
      art/IMG/one.png
  64. 0
    0
      art/IMG/pzBzdWJ.png
  65. 0
    0
      art/IMG/qU9A9le.png
  66. 0
    0
      art/IMG/r24kivj.gif
  67. 0
    0
      art/IMG/r9druDA.png
  68. 0
    0
      art/IMG/sI0NAgT.gif
  69. 0
    0
      art/IMG/thumbnail.sh
  70. 0
    0
      art/IMG/uJJIABC.gif
  71. 0
    0
      art/IMG/uv7s9NH.png
  72. 0
    0
      art/IMG/vmpnmSu.gif
  73. 0
    0
      art/IMG/xS6SL4w.png
  74. BIN
      art/THUMBS/thumb-0RDRCcF.png
  75. BIN
      art/THUMBS/thumb-2XSAyJd.png
  76. BIN
      art/THUMBS/thumb-39vccUW.png
  77. BIN
      art/THUMBS/thumb-85JbIrp.png
  78. BIN
      art/THUMBS/thumb-Apr1ehA.png
  79. BIN
      art/THUMBS/thumb-BsyZSeN.png
  80. BIN
      art/THUMBS/thumb-DcgI0el.png
  81. BIN
      art/THUMBS/thumb-HOx95ki.png
  82. BIN
      art/THUMBS/thumb-M50A4q6.png
  83. BIN
      art/THUMBS/thumb-SCOUT.png
  84. BIN
      art/THUMBS/thumb-bRAxUjI.png
  85. BIN
      art/THUMBS/thumb-blessed_camera.JPG
  86. BIN
      art/THUMBS/thumb-dMzt71u.png
  87. BIN
      art/THUMBS/thumb-eggGL.png
  88. BIN
      art/THUMBS/thumb-fMMLDkW.png
  89. BIN
      art/THUMBS/thumb-fnH1IU7.png
  90. BIN
      art/THUMBS/thumb-groJcSL.png
  91. BIN
      art/THUMBS/thumb-one.png
  92. BIN
      art/THUMBS/thumb-pzBzdWJ.png
  93. BIN
      art/THUMBS/thumb-qU9A9le.png
  94. BIN
      art/THUMBS/thumb-r9druDA.png
  95. BIN
      art/THUMBS/thumb-uv7s9NH.png
  96. BIN
      art/THUMBS/thumb-xS6SL4w.png
  97. 2
    2
      art/index.php
  98. 0
    0
      art/test.php
  99. 0
    0
      assets/css/site.css
  100. 0
    0
      assets/js/site.js

BIN
IMG/img1.jpg View File


BIN
IMG/img2.jpg View File


BIN
IMG/img3.jpg View File


BIN
IMG/key1.jpg View File


BIN
IMG/key2.jpg View File


BIN
IMG/layout2cropped.png View File


+ 0
- 0
LICENSE.md View File


+ 0
- 0
README.md View File


+ 6
- 4
_config.yml View File

@@ -2,10 +2,12 @@
2 2
 title: Abrahim Ladha
3 3
 email: abrahimladha@protonmail.ch
4 4
 description: "Welcome to my site"
5
-logo_location: "https://placehold.it/100x100&text=LOGO"
6
-destination: /var/www/html/abrahimladha
7
-baseurl: "/abrahimladha" # the subpath of your site, e.g. /blog/
8
-url: "https://vgd.me/abrahimladha" # the base hostname & protocol for your site
5
+#logo_location: "https://placehold.it/100x100&text=LOGO"
6
+#logo_location: "https://media.giphy.com/media/lWxG18p1SOlEc/giphy.gif"
7
+logo_location: "https://ladha.me/cube1.gif"
8
+destination: /var/www/html
9
+baseurl: "" # the subpath of your site, e.g. /blog/
10
+url: "http://ladha.me" # the base hostname & protocol for your site
9 11
 
10 12
 # Build settings
11 13
 markdown: kramdown

+ 14
- 0
_data/menu.yml View File

@@ -4,9 +4,23 @@ mainmenu:
4 4
     url: "/"
5 5
     text: "Home"
6 6
     icon_class: "fa-home"
7
+  CV:
8
+    url: "/files/cv_ladha.pdf"
9
+    text: "CV"
10
+    icon_class: "fa-graduation-cap"
7 11
   blog:
8 12
     url: "/blog/"
9 13
     text: "Blog"
14
+    icon_class: "fa-book"
15
+  git:
16
+    url: "https://git.ladha.me"
17
+    text: "Software"
18
+    icon_class: "fa-code-fork"
19
+  Documents:
20
+    url: "/documents/"
21
+    text: "Documents"
22
+    icon_class: "fa-files-o"
10 23
   other:
11 24
     url: "/other/"
12 25
     text: "Other"
26
+    icon_class: "fa-random"

+ 0
- 0
_includes/footer.html View File


+ 0
- 0
_includes/head.html View File


+ 1
- 1
_includes/header.html View File

@@ -19,7 +19,7 @@
19 19
 
20 20
           {% for menuItem in site.data.menu.mainmenu %}
21 21
             <li><a href="{{ menuItem[1].url | prepend: site.baseurl }}">
22
-              <i class="fa {{menuItem[1].icon_class}}"></i> {{menuItem[1].text}}</a>
22
+                <i class="fa {{menuItem[1].icon_class}}"></i> {{menuItem[1].text}}</a>
23 23
             </li>
24 24
           {% endfor %}
25 25
 

+ 0
- 0
_layouts/default.html View File


+ 1
- 1
_layouts/page.html View File

@@ -11,7 +11,7 @@ layout: default
11 11
         {% if page.subtitle %}
12 12
           <h5 class="page-subtitle"> {{ page.subtitle }} </h5>
13 13
         {% endif %}
14
-        <small> <i class="fa fa-calendar"></i>
14
+        <!--<small> <i class="fa fa-calendar"></i>-->
15 15
           <time>
16 16
             {{ page.date | date:'%A, %B %d, %Y'}}
17 17
           </time>

+ 0
- 0
_layouts/post.html View File


+ 0
- 0
_posts/2015-07-07-not-our-department.md View File


+ 0
- 0
_posts/2015-09-08-how-i-solve-my-cube.md View File


+ 3
- 3
_posts/2016-04-14-one-of-my-favorite-integrals.md View File

@@ -55,7 +55,7 @@ Now we can do a $$u$$ substition. Let $$u = -r^2$$ and $$du = -2r dr$$.
55 55
 \end{equation}
56 56
 
57 57
 \begin{equation}
58
--\pi(e^\infty - e^0) = \pi
58
+-\pi(e^{- \infty} - e^0) = \pi
59 59
 \end{equation}
60 60
 
61 61
 
@@ -65,6 +65,6 @@ Since $$I^2 = \pi$$, then $$I = \sqrt{\pi}$$. To summarize:
65 65
 \int_{-\infty}^{\infty} e^{-x^2}dx = \sqrt{\pi}
66 66
 \end{equation}
67 67
 
68
-This is like the coolest thing Ive ever seen for a few reasons. It looks maliciously easy, especially to calc I students. Integrals and derivatives of $$e$$ are supposed to be easy. This also has a lot of applications in statistics with the gaussian.I haven't taken a course in probability yet so I don't really know. Theres also a neat trick where Feynman uses $$ae^{-x^2}$$ to derive an approximation of Schrodingers equation. 
68
+This is like the coolest thing Ive ever seen for a few reasons. It looks maliciously easy, especially to calc I students. Integrals and derivatives of $$e$$ are supposed to be easy. This also has a lot of applications in statistics with the gaussian. I haven't taken a course in probability yet so I don't really know. Theres also a neat trick where Feynman uses $$ae^{-x^2}$$ to derive an approximation of Schrodingers equation. 
69 69
 
70
-This post was also really just a testing ground to see if I could get mathjax working. It looks sucessful.  
70
+This post was also really just a testing ground to see if I could get mathjax working. It looks sucessful.

+ 36
- 0
_posts/2016-07-06-bc-is-a-terrible-calculator.md View File

@@ -0,0 +1,36 @@
1
+---
2
+layout: post
3
+date: 2016-07-06 12:00	
4
+title: bc is a terrible calculator
5
+published: true
6
+---
7
+I've been messing around with some terminal based calculators. For my
8
+cryptography class, we had to do some huge computations. Ive noticed that
9
+GNU bc is actually pretty slow at this:
10
+
11
+    [whoishex@localhost ~]$ time echo "(2^2000000)%7" | bc
12
+    4
13
+    real    0m12.295s
14
+    user    0m12.297s
15
+    sys     0m0.000s
16
+    [whoishex@localhost ~]$
17
+
18
+Thats pretty slow! I tried bigger numbers and it would take minutes. In its
19
+place, I've started using the python shell.
20
+
21
+    [whoishex@localhost ~]$ time echo "(2**20000000)%7" | python -i 
22
+    Python 3.5.2 (default, Jun 28 2016, 08:46:01) 
23
+    [GCC 6.1.1 20160602] on linux
24
+    Type "help", "copyright", "credits" or "license" for more information.
25
+    >>> 4
26
+    >>> 
27
+
28
+    real    0m0.186s
29
+    user    0m0.170s
30
+    sys     0m0.017s
31
+    [whoishex@localhost ~]$
32
+
33
+basically instant. Gnome-calculator, wolfram alpha, and literally any other modern
34
+calculator I can get my hands on is also equally fast. I think bc is trying to
35
+calculate 2^2000000 before modding it out, while the other programs implement
36
+some sort of [method of repeated squares](https://en.wikipedia.org/wiki/Modular_exponentiation#Memory-efficient_method). 

+ 191
- 0
_posts/2018-01-01-chromebook-pixel-arch-linux.md View File

@@ -0,0 +1,191 @@
1
+---
2
+layout: post
3
+date: 2018-01-01 12:00 
4
+title: Chromebook Pixel and Arch Linux
5
+published: true
6
+---
7
+I bought a Chromebook Pixel from 2013 during the Summer of 2016 since I wanted
8
+a new laptop, and these had deprecated in value incredibly considering they
9
+were $1200-1500 when they launched. I picked up the 64GB model for about $400. 
10
+There are a lot of issues with this laptop and maybe I won't do the
11
+same thing again. The display is incredibly bright and the image can often burn
12
+in if left on for too long. There is basically no cooling on this machine, so
13
+it was constantly at 85 celsius (I found a fix for this later) and the battery
14
+life was pretty terrible. My old C720, I could easily get 12 or 13 hours out of
15
+the thing. I have to charge this every day and be lucky to get 4 hours. Maybe I
16
+was just spoiled. I do like the 4:3 aspect ratio. It makes having two windows
17
+that partition the screen vertically more comfortable on a laptop. The
18
+resolution is also somewhat wasted on me. The fonts I mostly use are usually
19
+all monospaced and pixel perfect, so I don't see an upgrade for 95% of what I
20
+do on this machine, but PDFs and webpages look like real paper, which is kinda
21
+neat I guess.
22
+
23
+![The machine](https://ladha.me/IMG/img3.jpg "The machine"){:height="576px" width="768px"}
24
+
25
+There are two ways you can install linux on this machine. You can leave the
26
+machine in developer mode and keep chromeos, or you can do a small hardware mod
27
+and flash the bios to have a full UEFI ROM. I eventually moved to the UEFI
28
+method since you get some nice things, like suspend-to-disk and no weird error
29
+screen on boot. These instructions are specific to this now 5 year old laptop,
30
+but they could work for any chromebook really.
31
+
32
+We want to flash a UEFI ROM. First we need to remove a single R/W screw from
33
+inside the machine. Power it off and flip it over. The back panel is held down
34
+by 4 screws covered by the little rubber feet. You should have the proper tools
35
+for this. I tried to remove them using a combination of butter knives and
36
+melted pens and I ended stripping one of the miniscule screws. You should buy a
37
+jewelers kit if you are serious enough.
38
+
39
+![The back](https://ladha.me/IMG/img2.jpg "The back"){:height="576px" width="768px"}
40
+
41
+They are very very tiny. After taking them out you should feel the backplate be kind of
42
+loose. Use some kind of spudger tool to pry it and be careful of the clips near
43
+the IO ports. I used a guitar pick for the gluey stuff and a plastic butter
44
+knife for the clips. You might need to flex the back a little but be careful.
45
+After the back is off look for a screw that looks like this near the USB ports:
46
+
47
+![The screw](https://ladha.me/IMG/img1.jpg "The screw"){:height="1024px" width="768px"}
48
+
49
+I didn't find any documentation where this screw was on the 2013 model, but
50
+there were pictures of it on the 2015 model, and I removed it to see if it was
51
+the same and sure enough I could write. It also has those telling little
52
+contacts on it. It seems to be smaller than the R/W screw on other chromebooks.
53
+After you remove this screw and the little contact washer on it, clip the back
54
+panel back on and put the screws back in. I didn't have to glue the feet back on.
55
+There was enough already left on the feet so they just stuck back in.
56
+
57
+After we have removed the screw. Get to a chronos terminal window and run this
58
+command:
59
+
60
+     cd; curl -LO https://mrchromebox.tech/firmware-util.sh && sudo bash firmware-util.sh
61
+
62
+Normally you should be worried about running random scripts off the internet,
63
+but the worst that can happen is that it destroys your operating system. Which
64
+you plan on doing anyway with it. Make sure you save everything you want from
65
+your current chromeos install because doing this next step will nuke
66
+everything. After the script runs you will be dropped in to some basic menu.
67
+You want to select option 3, Installing the full ROM firmware. Follow the steps
68
+and afterwards when you reboot you should be dropped into an intel EFI shell
69
+with some very basic commands. Go make a USB of Arch and plug it in and reboot
70
+
71
+I wanted to make the Instructions for installing Arch as easy as possible
72
+simply by regurgitating commands. So thats what the next list of stuff is with
73
+some included. I came up with this list from several guides modified to better
74
+fit this machine.
75
+
76
+    wifi-menu
77
+
78
+Connect to your wifi network, then update, and check if the efi variables are non empty.
79
+
80
+    pacman -Sy
81
+    efivar -l
82
+    lsblk
83
+    gdisk /dev/sda
84
+
85
+Once you are in gdisk, type x z y y to clear any all current partitions.
86
+
87
+    cgdisk /dev/sda
88
+
89
+We are going to make 3 paritions. A 512MiB root partition. an 8GiB swap
90
+partition, and the remaining as our root partition. Adjust these values if you
91
+want. I think a 4GiB swap size is fine. As long as its bigger than your 4GiB
92
+ram if you want suspend properly.
93
+
94
+boot: new, enter, first sector is blank, size is 512MiB, hex code is EF00, name
95
+is boot
96
+
97
+swap: new, enter first is blank second size is 8GiB, hex code is 8200, name is
98
+swap
99
+
100
+root: new, enter, first is blank, size is blank (remaining), hex code is blank,
101
+name is root
102
+
103
+You want to write those changes and then exit cgdisk. Now we format our partitions:
104
+
105
+    mkfs.fat -F32 /dev/sda1
106
+    mkswap /dev/sda2
107
+    swapon /dev/sda2
108
+    mkfs.ext4 /dev/sda3
109
+    mount /dev/sda3 /mnt
110
+    mkdir /mnt/boot
111
+    mount /dev/sda1 /mnt/boot
112
+    cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlistbackup
113
+    sed -i 's/^#Server/Server/' /etc/pacman.d/mirrorlistbackup
114
+    rankmirrors -n 6 /etc/pacman.d/mirrorlistbackup >> /etc/pacman.d/mirrorlist
115
+    pacstrap -i /mnt base base-devel #should download a gigabyte
116
+    genfstab -U -p /mnt >> /mnt/etc/fstab
117
+    arch-chroot /mnt
118
+    uncomment en_US UTF-8 from /etc/locale.gen
119
+    locale-gen
120
+    echo LANG=en_US.UTF-8 > /etc/locale.conf
121
+    export LANG=en_US.UTF-8
122
+    ln -s /usr/share/zoneinfo/America/New_York > /etc/localtime
123
+    hwclock --systohc --utc
124
+
125
+My hostname is "pixel". You can change yours as well.
126
+
127
+    echo pixel > /etc/hostname
128
+
129
+We are also going to enable trim on this since it technically has an SSD. This
130
+will run once a week.
131
+    
132
+    systemctl enable fstrim.timer
133
+
134
+in /etc/pacman.conf enable multilib by uncommenting [multilib] and the next line
135
+    
136
+    pacman -Sy
137
+    passwd
138
+
139
+now to set up our user:
140
+    
141
+    useradd -m -g users -G  wheel,storage,power -s /bin/bash whoishex
142
+    visudo
143
+
144
+uncomment the wheel line
145
+add to the end of the file ```Defaults rootpw```
146
+    
147
+    mount -t efivarfs efivarfs /sys/firmware/efi/efivars/ 
148
+
149
+This should say its already mounted. The UEFI ROM does not find where ever grub puts its grubx64.efi file, and there
150
+is a bug where changes to where to find the EFI file do not persist in the UEFI
151
+settings. I have had much more luck with systemd-boot in it getting picked up.
152
+
153
+    bootctl install
154
+    pacman -S intel-ucode
155
+
156
+in the file ```/boot/loader/entries/arch.conf```
157
+
158
+    title Arch Linux
159
+    linux vmlinuz-linux
160
+    initrd /intel-ucode.img
161
+    initrd /initramfs-linux.img
162
+
163
+Exit the file and save it.
164
+    
165
+    echo "options root=PARTUUID=$(blkid -s PARTUUID -o value /dev/sda3) rw" >> /boot/loader/entries/arch.conf
166
+
167
+You can open up the arch.conf again to see what this did.
168
+We need to find the name of our networking device. Mine is called wlp3s0. You
169
+might have another device if you have an LTE card so enable that as well.
170
+    
171
+    ip link
172
+    systemctl enable dhcpcd@wlp3s0.service
173
+    pacman -S networkmanager
174
+    systemctl enable NetworkManager.service
175
+    exit
176
+    umount -R /mnt
177
+    shutdown now
178
+
179
+Now unplug the drive and power on. From here you can install your desktop enviroment or window manager. Make sure
180
+you install a display manager like lightdm or gdm so you can login easier.
181
+
182
+To get suspend working edit the file in ```/boot/loader/entries/arch.conf ``` to say ```options resume=/dev/sda2 root...```
183
+change ```HandleLidSwitch=hibernate``` in ```/etc/systemd/logind.conf````
184
+
185
+If you want to control the lightbar and fans and thermals. There is a utility
186
+called ```ectool```. I happened to find a binary version of it [here](https://github.com/abrahimladha/ectool-chromebook-pixel-2013). Move it to ```/bin/```
187
+and type ```ectool help ``` to get started with it.
188
+
189
+You might have some issues with suspending twice.
190
+[This](https://plus.google.com/+LinusTorvalds/posts/UCoQzy8g2xB) is the fix for
191
+that. 

+ 194
- 0
_posts/2018-01-19-math-keyboard.md View File

@@ -0,0 +1,194 @@
1
+---
2
+layout: post
3
+date: 2018-01-20 12:00 
4
+title: A Mathematician's Keyboard
5
+published: true
6
+---
7
+I have been needing a use for an extra keyboard I had sitting in the closet. 
8
+
9
+![My desk](https://ladha.me/IMG/key2.jpg "My desk"){:height="576px" width="768px"}
10
+
11
+I like to latex all my assignments before turning them in, but I've started to
12
+notice that it is taking longer and longer to do so. I took a quantum computing
13
+course recently and the notation in that was abusive. Take for example this
14
+simple glyph:
15
+
16
+\begin{equation}
17
+|\psi_1 \rangle
18
+\end{equation}
19
+
20
+It is really a single character, but It is very complicated. I'd like to be
21
+able to only have to push one button. To type it, even
22
+with texstudio's autocomplete took 12 key presses. This is for a single
23
+glyph! Only one of the symbols nested in that glyph are actually on my
24
+keyboard. I decided that if I made a new keyboard containing those symbols, I
25
+should be able to write math faster for latex. My goal was to be able to type
26
+at a speed fast enough that I could even be able to do some scratch work in math mode
27
+for latex. 
28
+
29
+I wanted this to be as customized to myself as possible. I am sure that many
30
+people use different symbols on a daily basis. I do mostly discrete math so it
31
+is rare that I work with integrals, or other symbols common to other people. 
32
+I store all my latex assignments like
33
+```.../School/Semester/Class/Assignment/hw1.tex```. Knowing this I could get a
34
+regex to scan through every latex file I had written and sort by most popular.
35
+The regex ended up looking something like this:
36
+
37
+    grep -o -h -E "\\\\\\w+" ./*/*/*.tex | sort | uniq -c | sort -nr
38
+
39
+This outputted a list like:
40
+
41
+    1556 \end
42
+    1556 \begin
43
+    667 \usepackage
44
+    614 \noindent
45
+    475 \in
46
+    435 \item
47
+    429 \frac
48
+    320 \alpha
49
+    252 \textbf
50
+    245 \mathbb
51
+    224 \ket
52
+    222 \bigskip
53
+    199 \implies
54
+    ...     
55
+
56
+First thing to note is I used \begin exactly as many times as I used \end, so thats nice to know!
57
+It had about a 300 entries so I am not going to show them all 
58
+(but they are [here](https://git.ladha.me/abrahimladha/math-keyboard/src/master/grepped.txt)). Many were used
59
+only once. I really only needed to look at the most used ones. I also wanted my
60
+keyboard to be fully consistent. I use \ket way way more than I use \bra or
61
+\braket, but If I put \ket, I also wanted to be able to put \bra, and \braket.
62
+I came up with my list of symbols and the next challenge was to design a layout
63
+that would go on top of a keycap set. I first studied how dvorak was created.
64
+Dvorak tried to re-invent the qwerty layout to minimize errors and maximize
65
+speed. He studied hand movements and frequency of letters used in the English
66
+keyboard. The two main things I took away from his work was that, more common
67
+letter should be easier to reach, as well as that characters that have a
68
+similiar probability of being adjacent should be put on opposite hands. To
69
+explain better, if your characters don't alternate as often as they could, it
70
+is effectly like you are typing with one hand as the second hand is really
71
+waiting for the queue of letters on the first to finish. You cannot type
72
+letters before the ones that come before them have been typed.
73
+
74
+I tried to do the opposite of that in hoping it would have the same effect. Symbols
75
+that had no chance of being adjacent in a word, have a high chance of being
76
+adjacent on my layout. This worked well with the fact many symbols should just
77
+naturally be close to each other. If the \ket is not close to the \bra, it
78
+feels just kind of mentally wrong. When you want a \bra or a \ket, you should
79
+mentally think to the same area of the keyboard. 
80
+
81
+Another thing I did was try to group terminals and non terminals from how a
82
+context free grammar might form. I consider symbols that can stand on their own
83
+to be terminals, and everything else to be non terminals. For example
84
+operators, like +,- are non terminals, as well as \ket, \frac, \sum, \choose,
85
+all of these are dependent on following or previous terminals to form a glyph.
86
+Here is my layout:
87
+
88
+![Current Layout](https://ladha.me/IMG/layout2cropped.png "Current layout"){:height="256px" width="768px"}
89
+
90
+I put my most common greek letters on the number keys, and on their shift
91
+layer, the capital versions of them. Alpha and Beta dont have capitals so I
92
+threw the terminals infinity and dagger (like, for hermitian operators) on
93
+those keys since I used them infrequently enough, but still wanted them on the
94
+keyboard and had no other room for them. I also use both variations of epsilon.
95
+I use varepsilion for empty strings, among other things and epsilon for
96
+analysis proofs. 
97
+
98
+I put the arrow keys right in the middle of the keyboard on hjkl, exactly how
99
+vim has it. I did this because I find that moving my hand to the arrow keys and
100
+then back to the rest position actually wastes quite a bit of time. I have to
101
+readjust and everything. The normal arrow keys still function perfectly fine if
102
+i want to lean back and scroll or something.
103
+
104
+The only terminal I didn't put on the number keys was the \emptyset, since there 
105
+was no more room. I put it next to the other set nonterminals with \in.
106
+
107
+I also wanted to use this opportunity to enforce better notation on my part.
108
+Sometimes when using modulo I use equal instead of congruence, which doesn't
109
+really matter all that much, but if I put \cong on the keyboard, I might be
110
+encouraged to do the slightly more correct thing.
111
+
112
+To configure the keyboard softwareside, we are going to use two programs. One
113
+is called xte, which is part of xautomation, and the other is called actkbd.
114
+To start we want to see a list of devices that we have.
115
+
116
+    cat /proc/bus/input/devices
117
+
118
+This should list all inputs, even the power
119
+button. This is what an entry should look like
120
+
121
+    I: Bus=0003 Vendor=0f39 Product=1048 Version=0110
122
+    N: Name="Heng Yu Technology F-104"
123
+    P: Phys=usb-0000:00:12.1-1/input0
124
+    S:
125
+    Sysfs=/devices/pci0000:00/0000:00:12.1/usb6/6-1/6-1:1.0/0003:0F39:1048.0005/input/input7
126
+    U: Uniq=
127
+    H: Handlers=sysrq kbd event7 leds 
128
+    B: PROP=0
129
+    B: EV=120013
130
+    B: KEY=e080ffdf01cfffff fffffffffffffffe
131
+    B: MSC=10
132
+    B: LED=1f
133
+
134
+The keyboard i want is called the F-104, so this must be the entry for it. Notice that
135
+under handlers it says ```event7```. This is important, and will probably
136
+change for you. Just remember this number. Now do
137
+
138
+    sudo actkbd -s -d /dev/input/event7
139
+
140
+and start typing on the keyboard. It should tell you the keycodes for each key
141
+input. For example left shift should be 42. Now we need to write a config file
142
+for actkbd. It should be placed in ```/etc/actkbd.conf```
143
+After a lot of trial and error, this is what mine partially looks like.
144
+
145
+    42:key:ungrabbed,grab,noexec:
146
+    42:rel:grabbed,ungrab,noexec:
147
+
148
+    16:key:ungrabbed,grab:echo 'str \alpha ' | xte
149
+    16:rel:grabbed,ungrab:
150
+    16+42:key:grabbed:echo 'str \infty ' | xte
151
+
152
+the entries go like, keycode, type, property, and then what is called to
153
+system. When we call ```echo 'str \alpha' | xte```, xte simulates that string of
154
+keypresses. So what we are doing is physically inputting, then through the
155
+keyboard layer, interrupted by actkbd, to make a systemcall to go back to the
156
+keyboard layer to simulate the correct string. The grab comman is there so that
157
+actkbd will stop the actual keyboard input as well so you don't get "1\alpha".
158
+The full config can be found
159
+[here](https://git.ladha.me/abrahimladha/math-keyboard/src/master/actkbd.conf).
160
+
161
+Finally to apply the configuration file you do:
162
+
163
+    sudo actkbd -d /dev/input/event7 -D
164
+
165
+When testing around, its better to ```sudo kill -9 actkbd``` before reapplying
166
+an updated config. I have found not doing that while testing creates a ton of
167
+unexpected behavior regarding other inputs. 
168
+
169
+To make a pretty picture of the layout, I searched on the internet for a while.
170
+Eventually I found some [inkscape
171
+files](https://support.wasdkeyboards.com/hc/en-us/articles/115007847008-Download-Template-Files)
172
+from the wasdkeyboards company for
173
+making and sending them custom layouts to create and purchase. I used latex 
174
+and exported each symbol one by one as an svg. Then I imported them and spent a
175
+few hours arranging everything so it looks nice and even. I printed it out
176
+and taped the picture above my monitor so I can just glance if I don't know
177
+where something is. If I update the layout I only need to print out a new
178
+picture. 
179
+
180
+![taped](https://ladha.me/IMG/key1.jpg "taped"){:height="576px" width="768px"}
181
+
182
+From some testing, I would say it has decreased the time for me to type
183
+assignments to
184
+between a half and a third on average. To revisit the glyph from before, it
185
+took me twelve presses. Now it only takes me four.  I also decided against either laser
186
+cutting or putting stickers on the keys to have them actually labelled. I want
187
+this to be a evolving and dynamic layout. I have already added two changes that
188
+I didn't consider before to the comma key, and Im sure I will change more in
189
+the future as I get interested in different subjects. 
190
+
191
+Whats next? Foot pedals maybe? Programming them would be as easy as this, but I don't
192
+think I could find a use for them. I feel like I have now hit peak
193
+automation, atleast as my input to the computer is concerned. If that will stay is
194
+to be seen. 

+ 23
- 0
_posts/earth-round.md View File

@@ -0,0 +1,23 @@
1
+---
2
+layout: post
3
+date: 2015-07-07 23:08
4
+title: Proof the earth is round
5
+published: false
6
+---
7
+I got into an argument with some people who believe that the earth is flat.
8
+This made me kind of realize that I am not entirely certain why the earth is
9
+round. Obviously it is, the ships over the horizon, the Erosthanese experiment.
10
+Flat earthers don't even seem certain about their model. They are only certain
11
+enough to deny that the earth is round. I wanted to see if I could come up with
12
+a proof that the earth is round using as few physical assumptions as possible.
13
+Flat earthers will even deny gravity(universal acceleration) as a force
14
+Assumptions:
15
+units for distance
16
+units for time
17
+units for mass
18
+gravity is a force dependent on mass
19
+gravitational force behaves as if the object was a point "center of mass"
20
+
21
+derive inverse square law
22
+concept of potential energy
23
+object of minimal potential energy must be a sphere.

+ 70
- 0
_posts/laptop-review-draft.md View File

@@ -0,0 +1,70 @@
1
+---
2
+layout: post
3
+date: 2016-07-06 12:00	
4
+title: The Chromebook Pixel 2013, a linux users review
5
+published: false
6
+---
7
+So after my c720 running out of memory and not having swap set up for what
8
+feels like the hundreth time i felt the need to upgrade to a better laptop. I
9
+wanted to get something with good free software support, including at the bios
10
+level, so coreboot was a priority, so I ended up on this. I picked it up for
11
+400 dollars for the 64gb LTE 2013 model. 
12
+
13
+hardware
14
+
15
+So The first and most noticable part of this laptop is the screen. A 12.85
16
+2560 x 1700 3:2 display. The aspect ratio makes it great for programming. It
17
+keeps the laptop still compact while maximizing screen real estate. The sheer
18
+amount of pixels also make the web look amazing, but for programming I use a
19
+perfect pixel font, so theres no difference for that. The biggest downside for
20
+the screen is the extreme glare. Its a touchscreen so they used a glass panel.
21
+Glass screens are already commonly known for their glare, but this is another
22
+level. Its significantly more than my phone, or my friends macbooks. As I am
23
+typing this, I can see my face in the terminal with as much detail as a mirror.
24
+The screen also extremely bright and has significant burn in issues.
25
+I leave the screen anywhere from 5 to 15% brightness since anything else pains
26
+my cornea. Images also burn in easily. If I leave something thats not solid
27
+black open for a few minutes, the pixels preserve the color slightly and the
28
+image persists. Its not a super big issue since terminal backgrounds are black
29
+anyway, and I use a dark GTK theme anyway.
30
+
31
+The keyboard is nice, and simple. Theres only a ctrl and alt modifier. No
32
+windows key. no fn key. no caps lock key. Typing on it is pretty good I guess.
33
+I think most laptop keyboards are fine except those new ultrabook keyboards
34
+which are garbage. Theres also a windows modifier where the caps lock key
35
+should be so binding that to escape is great for vim. The escape and function
36
+keys are a little harder to press and kind of hinge instead of depressing. Not
37
+that big of a deal but just something to notice. 
38
+
39
+The specs are nice too. 64GB storage, 4GB ram, some i5 chip. The problem seems
40
+to be that since this is google's first laptop, they just tried to copy some
41
+popular features of other common laptops with out really understanding them on
42
+a deeper level. For example theres no vents in this thing at all, but theres
43
+still a fan, so the exhaust ends up behind the spaces between keys on the
44
+keyboard. Anything mildly graphically intensive spikes the temperature to
45
+85-100 degrees celsius and it blows directly over the WASD keys burning my
46
+hand. The exterior of the laptop is also aluminum colored gray, but its stamped
47
+instead of milled. This provides absolutely none of the structural benefits and
48
+all of the downsides as how efficient it is for transmitting heat. 
49
+
50
+software
51
+
52
+First thing I did was wipe chromeos entirely from the drive and reformat the
53
+drive as one partition. I am running my love-hate relationship with arch linux.
54
+I love it because the package manager is fast and it allows unlimited
55
+customization. You get to build it up rather than tear something apart. I hate
56
+it because something always breaks and I spend way too much time trying to fix
57
+it. The interesting part about this laptop is since it is such a rare device
58
+for anyone to own, linux support is spotty. I had to compile and implement the
59
+keyboard backlight from some random repo on github myself. After months, I
60
+still haven't gotten it to hibernate to my swapfile when I close the lid, and I
61
+have accepted that I never will. 
62
+
63
+The high dpi of this display means its supposed to be run in hidpi mode. This
64
+seems to work more than fine on gnome stuff, but I run i3wm. configuring hipdi
65
+on arch linux without a desktop enviroment is still a pain. When I log in, it
66
+forgets what the dpi is until I reset it. Changing the display resolution in
67
+arandr (to make some graphical stuff not scream the laptop) does not change the
68
+dpi, so I end up with a giant cursor. Some apps simply ignore everything, all
69
+xrandr presets and gtkrc and qt configs and just render however they want.
70
+This experience makes any not default usecase painful. 

+ 0
- 0
art/IMG/0RDRCcF.png View File


+ 0
- 0
art/IMG/2XSAyJd.png View File


+ 0
- 0
art/IMG/39vccUW.png View File


+ 0
- 0
art/IMG/5kz8ALP.gif View File


+ 0
- 0
art/IMG/85JbIrp.png View File


+ 0
- 0
art/IMG/Apr1ehA.png View File


+ 0
- 0
art/IMG/BsyZSeN.png View File


+ 0
- 0
art/IMG/DHsueEA.jpg View File


+ 0
- 0
art/IMG/DcgI0el.png View File


+ 0
- 0
art/IMG/EE73Xgo.jpg View File


+ 0
- 0
art/IMG/Eri6bRs.gif View File


+ 0
- 0
art/IMG/GDFnV6j.gif View File


+ 0
- 0
art/IMG/HOx95ki.png View File


+ 0
- 0
art/IMG/HqUNw22.gif View File


+ 0
- 0
art/IMG/Jpy9HR4.gif View File


+ 0
- 0
art/IMG/M50A4q6.png View File


BIN
art/IMG/SCOUT.png View File


+ 0
- 0
art/IMG/Snapchat-8383819522267284680.jpg View File


+ 0
- 0
art/IMG/VqClh5B.gif View File


+ 0
- 0
art/IMG/bRAxUjI.png View File


BIN
art/IMG/blessed_camera.JPG View File


+ 0
- 0
art/IMG/dMzt71u.png View File


+ 0
- 0
art/IMG/eggGL.png View File


+ 0
- 0
art/IMG/fMMLDkW.png View File


+ 0
- 0
art/IMG/fnH1IU7.png View File


+ 0
- 0
art/IMG/groJcSL.png View File


+ 0
- 0
art/IMG/halftone_heartbeat_by_ibayibay1-d6xe9rf.gif View File


+ 0
- 0
art/IMG/ima_0ab8af9.jpeg View File


+ 0
- 0
art/IMG/ima_40dc802.jpeg View File


+ 0
- 0
art/IMG/ima_53780fd.jpeg View File


+ 0
- 0
art/IMG/ima_5c20507.jpeg View File


+ 0
- 0
art/IMG/ima_640b6ae.jpeg View File


+ 0
- 0
art/IMG/ima_6891122.jpeg View File


+ 0
- 0
art/IMG/ima_9732c6a.jpeg View File


+ 0
- 0
art/IMG/ima_cb81ce3.jpeg View File


+ 0
- 0
art/IMG/ima_e7f5340.jpeg View File


+ 0
- 0
art/IMG/ima_fb15143.jpeg View File


+ 0
- 0
art/IMG/jxCi2Sd.gif View File


BIN
art/IMG/one.png View File


+ 0
- 0
art/IMG/pzBzdWJ.png View File


+ 0
- 0
art/IMG/qU9A9le.png View File


+ 0
- 0
art/IMG/r24kivj.gif View File


+ 0
- 0
art/IMG/r9druDA.png View File


+ 0
- 0
art/IMG/sI0NAgT.gif View File


+ 0
- 0
art/IMG/thumbnail.sh View File


+ 0
- 0
art/IMG/uJJIABC.gif View File


+ 0
- 0
art/IMG/uv7s9NH.png View File


+ 0
- 0
art/IMG/vmpnmSu.gif View File


+ 0
- 0
art/IMG/xS6SL4w.png View File


BIN
art/THUMBS/thumb-0RDRCcF.png View File


BIN
art/THUMBS/thumb-2XSAyJd.png View File


BIN
art/THUMBS/thumb-39vccUW.png View File


BIN
art/THUMBS/thumb-85JbIrp.png View File


BIN
art/THUMBS/thumb-Apr1ehA.png View File


BIN
art/THUMBS/thumb-BsyZSeN.png View File


BIN
art/THUMBS/thumb-DcgI0el.png View File


BIN
art/THUMBS/thumb-HOx95ki.png View File


BIN
art/THUMBS/thumb-M50A4q6.png View File


BIN
art/THUMBS/thumb-SCOUT.png View File


BIN
art/THUMBS/thumb-bRAxUjI.png View File


BIN
art/THUMBS/thumb-blessed_camera.JPG View File


BIN
art/THUMBS/thumb-dMzt71u.png View File


BIN
art/THUMBS/thumb-eggGL.png View File


BIN
art/THUMBS/thumb-fMMLDkW.png View File


BIN
art/THUMBS/thumb-fnH1IU7.png View File


BIN
art/THUMBS/thumb-groJcSL.png View File


BIN
art/THUMBS/thumb-one.png View File


BIN
art/THUMBS/thumb-pzBzdWJ.png View File


BIN
art/THUMBS/thumb-qU9A9le.png View File


BIN
art/THUMBS/thumb-r9druDA.png View File


BIN
art/THUMBS/thumb-uv7s9NH.png View File


BIN
art/THUMBS/thumb-xS6SL4w.png View File


+ 2
- 2
art/index.php View File

@@ -3,12 +3,12 @@
3 3
 <body bgcolor="black">
4 4
 
5 5
 <?php
6
-$files = glob('THUMBS/*.{jpg,png,gif,jpeg}', GLOB_BRACE);
6
+$files = glob('THUMBS/*.{JPG,jpg,png,gif,jpeg}', GLOB_BRACE);
7 7
 foreach($files as $file) {
8 8
 $fileshort = substr($file, 13);
9 9
 list($width, $height, $type, $attr) = getimagesize($file);
10 10
 //echo $size[0], "<br>";
11
-echo "<a href=\"https://vgd.me/abrahimladha/art/IMG/$fileshort\"><img src=$file alt=$file style=\"width:$width;height:192px;padding:4px;border:thin solid black;\"></a>";
11
+echo "<a href=\"http://ladha.me/art/IMG/$fileshort\"><img src=$file alt=$file style=\"width:$width;height:192px;padding:4px;border:thin solid black;\"></a>";
12 12
 //echo "https://vgd.me/abrahimladha/art/$file", " ";
13 13
 }
14 14
 //echo "hello";  

+ 0
- 0
art/test.php View File


+ 0
- 0
assets/css/site.css View File


+ 0
- 0
assets/js/site.js View File


Some files were not shown because too many files changed in this diff