I hereby claim:
- I am javiermon on github.
- I am javiermon (https://keybase.io/javiermon) on keybase.
- I have a public key whose fingerprint is 53F0 38AF 631E 38B7 0992 E5D4 BC67 49E8 F676 0D3E
To claim this, I am signing this object:
| #include <stdio.h> | |
| #include <string.h> | |
| #include <stdlib.h> | |
| #include <errno.h> | |
| #include <unistd.h> | |
| #include <stdarg.h> | |
| typedef signed int Int; | |
| typedef unsigned int Uint; |
| import fcntl | |
| def set_close_exec(fd): | |
| """ | |
| Helper to add CLOEXEC to provided file descriptor. | |
| :param fd: int | |
| """ | |
| flags = fcntl.fcntl(fd, fcntl.F_GETFD) | |
| fcntl.fcntl(fd, fcntl.F_SETFD, flags | fcntl.FD_CLOEXEC) |
| [nemo@Jolla ~]$ devel-su | |
| Password: | |
| [root@Jolla nemo]# cd /etc/systemd/system | |
| [root@Jolla system]# nano mount-sd4android.service | |
| [root@Jolla system]# | |
| [root@Jolla system]# nano /usr/local/sbin/mount-sd4android.sh | |
| [root@Jolla system]# chmod ug+x /usr/local/sbin/mount-sd4android.sh | |
| [root@Jolla system]# systemctl enable mount-sd4android.service | |
| ln -s '/etc/systemd/system/mount-sd4android.service' '/etc/systemd/system/graphical.target.wants/mount-sd4android.service' | |
| ln -s '/etc/systemd/system/mount-sd4android.service' '/etc/systemd/system/display.service.wants/mount-sd4android.service' |
I hereby claim:
To claim this, I am signing this object:
| #include <stdint.h> | |
| #include <stdio.h> | |
| #define ETH_ALEN 6 | |
| int main(void) | |
| { | |
| uint8_t mac1[ETH_ALEN] = {0x00, 0x00, 0x00, 0x00, 0x00, 0xFF}; | |
| uint8_t mac2[ETH_ALEN] = {0x00, 0x00, 0x00, 0x00, 0x01, 0x00}; | |
| uint64_t a = (uint64_t)mac1[5] + |
| /* | |
| gcc -g -o nprocnetdev nprocnetdev.c | |
| Originally based on: | |
| http://www.iijlab.net/~jean/iflist.c | |
| Reference: | |
| http://iijean.blogspot.com/2010/03/howto-get-list-of-network-interfaces-in.html | |
| */ |
| /* | |
| iflist.c : retrieve network interface information thru netlink sockets | |
| (c) Jean Lorchat @ Internet Initiative Japan - Innovation Institute | |
| v1.0 : initial version - Feb 19th 2010 | |
| This file was obtained at the following address : | |
| http://www.iijlab.net/~jean/iflist.c |
| /* | |
| * "untar" is an extremely simple tar extractor: | |
| * * A single C source file, so it should be easy to compile | |
| * and run on any system with a C compiler. | |
| * * Extremely portable standard C. The only non-ANSI function | |
| * used is mkdir(). | |
| * * Reads basic ustar tar archives. | |
| * * Does not require libarchive or any other special library. | |
| * | |
| * To compile: cc -o untar untar.c |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <errno.h> | |
| #include <sys/types.h> | |
| #include <linux/inotify.h> | |
| #include <signal.h> | |
| #define EVENT_SIZE ( sizeof (struct inotify_event) ) | |
| #define EVENT_BUF_LEN ( 1024 * ( EVENT_SIZE + 16 ) ) |
| #!/usr/bin/env python | |
| """Simple HTTP Server With Upload. | |
| This module builds on BaseHTTPServer by implementing the standard GET | |
| and HEAD requests in a fairly straightforward manner. | |
| """ |