Tweaks for Thinkpad x240 (and maybe other models)
Unlock screen with fingerprint reader (still need keyring)
sudo apt install fprintd
Get more battery life (sometimes double)
sudo apt install auto-cpufreq
| # NOTE: cloudshell has hg | |
| git clone https://github.com/reticulatedpines/magiclantern_simplified magic-lantern | |
| # Get gcc | |
| wget https://developer.arm.com/-/media/Files/downloads/gnu-rm/5_4-2016q3/gcc-arm-none-eabi-5_4-2016q3-20160926-linux.tar.bz2?revision=111dee36-f88b-4672-8ac6-48cf41b4d375?product=GNU%20Arm%20Embedded%20Toolchain%20Downloads,32-bit,,Linux,5-2016-q3-update | |
| bzip2 -d gcc* | |
| tar -xf gcc* | |
| # Add GCC to path | |
| echo "export PATH=$PATH:~/gcc-arm-none-eabi-5_4-2016q3/bin" >> ~/.bashrc |
| # Create local.properties | |
| touch local.properties | |
| echo 'sdk.dir=/usr/lib/android-sdk/' > local.properties | |
| echo 'ndk.dir=/usr/lib/android-ndk/' >> local.properties | |
| @echo 'Installing android stuff via apt. (Ctrl+c to stop)' | |
| @read | |
| # All packages that *might* be needed | |
| sudo apt install android-sdk android-sdk-platform-23 |
Tweaks for Thinkpad x240 (and maybe other models)
Unlock screen with fingerprint reader (still need keyring)
sudo apt install fprintd
Get more battery life (sometimes double)
sudo apt install auto-cpufreq
| Qemu issue: | |
| ``` | |
| error: taking address of packed member of ‘struct QCowHeader’ may result in an unaligned pointer value | |
| ``` | |
| Went into `configure` and removed all `-Werror` | |
| Also had to edit `/home/daniel/Pulled/qemu-eos/qemu-2.5.0/hw/arm/../eos/dbi/backtrace.c:768` and | |
| replace `scnprintf` with `sprintf`. |
| ``` | |
| sudo apt install python2.7-minimal | |
| # If you want to refer to "python2.7" as "python" | |
| sudo apt install python-is-python2 | |
| # Now, get pip2. | |
| wget https://bootstrap.pypa.io/pip/2.7/get-pip.py | |
| sudo python2.7 get-pip.py | |
| ``` |
| label = gtk_label_new(NULL); | |
| gtk_widget_set_hexpand(label, TRUE); | |
| gtk_label_set_markup(GTK_LABEL(label), | |
| "Hello, World\n" | |
| "<span size='large'>This is a test.</span?"); | |
| gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_CENTER); | |
| gtk_grid_attach(GTK_GRID(mainGrid), label, 0, 0, 1, 1); | |
| gtk_widget_show(label); |
| ... | |
| // Set up notebook | |
| GtkWidget *notebook; | |
| notebook = gtk_notebook_new(); | |
| gtk_notebook_set_tab_pos(GTK_NOTEBOOK(notebook), GTK_POS_TOP); | |
| gtk_container_add(GTK_CONTAINER(window), notebook); | |
| gtk_widget_show(notebook); | |
| GtkWidget *grid = gtk_grid_new(); | |
| gtk_container_set_border_width(GTK_CONTAINER(grid), 10); |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| int main(int argc, char *argv[]) { | |
| if (argc != 2) { | |
| return -1; | |
| } | |
| FILE *reader = fopen(argv[1], "r"); | |
| int c = fgetc(reader); |
| @@@@@@@@\b\n\v\f\r@@@@@@@@@@@@@@@@@@ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ |
| !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[ ]^_`abcdefghijklmnopqrstuvwxyz{|}~ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ |