When a key combination is displayed, the modifiers are written in the order presented here. For example, Control + Option + Shift + Command + Q would be written as ⌃⌥⇧⌘Q.
| Sym | Key | Alt |
|---|---|---|
| ⌃ | Control | |
| ⌥ | Option |
| #!/usr/bin/env python3 | |
| import sys | |
| import os.path | |
| def isELF(path): | |
| with open(path, "rb") as fp: | |
| return tuple(fp.read(4)) == (0x7F, 0x45, 0x4C, 0x46) | |
| def isUniversalMachO(path): |
| #!/usr/bin/env python3 | |
| def transpose(matrix): | |
| "Swap the rows and columns of a 2-D matrix." | |
| return [list(row) for row in zip(*matrix, strict=True)] | |
| def rotate(matrix): | |
| """ | |
| Rotate a matrix 90 degrees clockwise |
| % LaTeX tabular which is oriented in landscape and takes the entire page | |
| \begin{landscape} | |
| \begin{table}[h] | |
| \centering | |
| \resizebox{\textwidth}{!}{% | |
| \begin{tabular}{|c|c|c|} | |
| \hline | |
| Header 1 & Header 2 & Header 3 \\ \hline | |
| Item 1 & Item 2 & Item 3 \\ \hline | |
| Item 4 & Item 5 & Item 6 \\ \hline |
Pass the GTK_THEME environment variable to the app:
$ GTK_THEME=<theme> <path>
You can replace <theme> with any available theme:
$ ls /usr/share/themes
| // Assuming 64-bit long | |
| unsigned long np2(unsigned long x) { | |
| --x; | |
| x |= x >> 1; | |
| x |= x >> 2; | |
| x |= x >> 4; | |
| x |= x >> 8; | |
| x |= x >> 16; | |
| x |= x >> 32; | |
| ++x; |
| #include <locale.h> | |
| #include <stdio.h> | |
| int main(int argc, char* argv[]){ | |
| setlocale(LC_ALL, ""); | |
| printf("LC_ALL: %s\n", setlocale(LC_ALL, NULL)); | |
| printf("LC_CTYPE: %s\n", setlocale(LC_CTYPE, NULL)); | |
| return 0; |
| # Check to see if a package named ansible is installed | |
| if [ "$(dpkg -l | awk '/ansible/ {print }'|wc -l)" -ge 1 ]; then | |
| echo OK | |
| else | |
| echo FAIL | |
| fi |
| // sudo apt update && apt install wordnet-dev | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| char *pickword(char *file) | |
| { | |
| FILE *fp = fopen(file, "r"); | |
| if (!fp) perror(file), exit(1); | |
| fseek(fp, 0, SEEK_END); | |
| long end = ftell(fp); |