This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <unistd.h> | |
| #include <linux/input.h> | |
| int read_event(struct input_event *event) | |
| { | |
| return fread(event, sizeof(struct input_event), 1, stdin) == 1; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Show a current active git branch in the shell prompt | |
| export PS1='\t \[\033[01;32m\]\u\[\033[01;34m\] \w\[\033[01;33m\]$(__git_ps1)\[\033[01;34m\] \$\[\033[00m\] ' | |
| # Shortcat for the pretty git log. Can be extended with the commit count parameter (last -10, last -35) | |
| alias last='git log --graph --all --oneline --decorate ' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* vi: set sw=4 ts=4: */ | |
| /* | |
| * Mini ping implementation for busybox | |
| * | |
| * Copyright (C) 1999 by Randolph Chung <tausq@debian.org> | |
| * | |
| * Adapted from the ping in netkit-base 0.10: | |
| * Copyright (c) 1989 The Regents of the University of California. | |
| * All rights reserved. | |
| * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #define _XOPEN_SOURCE 700 | |
| #include <signal.h> | |
| #include <unistd.h> | |
| int main() | |
| { | |
| sigset_t set; | |
| int status; | |
| if (getpid() != 1) return 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #define _POSIX_C_SOURCE 200809L | |
| #include <sys/time.h> | |
| #include <time.h> | |
| #include <stdlib.h> | |
| int main(int argc, char** argv) { | |
| int i; | |
| char* end; | |
| int times; | |
| for(i = 1; i < argc; i++) { |