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
# Plot the meminfo graph | |
library(shiny) | |
options(shiny.maxRequestSize=30*1024^2) | |
# Define UI | |
ui <- fluidPage( | |
# Application title | |
titlePanel("Plot meminfo Time Series Data"), |
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
#!/bin/bash | |
__VER="1.0" | |
INTERVAL=1 | |
usage () { | |
echo "Usage : $0 [options] [--] | |
Options: | |
-h|help Display this message |
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
================================================================ | |
Documentation for Kdump - The kexec-based Crash Dumping Solution | |
================================================================ | |
This document includes overview, setup and installation, and analysis | |
information. | |
Overview | |
======== |
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 <linux/fb.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <fcntl.h> | |
#include <errno.h> | |
#include <string.h> | |
#include <time.h> | |
#include <sys/mman.h> |
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
static unsigned int uyv_table[0x10000]; | |
void generate_rgb565_to_uyv_conv_table(void) | |
{ | |
int y, u, v; | |
unsigned char r, g, b; | |
unsigned int color = 0; | |
for (color = 0; color < 0x10000; color++) { | |
r = ((color & 0xF800) >> 8) + ((color >> 13) & 0x07); |
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
void semaphore_lock(int sem_id) | |
{ | |
int res = 0 | |
struct sembuf sops; | |
sops.sem_num = 0; | |
sops.sem_flg = SEM_UNDO; | |
sops.sem_op = -1; | |
do { | |
res = semop(sem_id, &sops, 1); | |
} while (res == -1 && errno == EINTR); |
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 <linux/mii.h> | |
#include <linux/sockios.h> | |
int check_iface_connected(int *psockfd) | |
{ | |
struct ifreq ifr; | |
if (*psockfd == -1) { | |
*psockfd = socket(AF_INET, SOCK_DGRAM, 0); | |
} |
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
string_slice() | |
{ | |
[ -z $2 ] && echo "Usage: string_slice \"string\" start [end]" && return | |
string=$1 | |
local len="${#string}" | |
local start="$2" | |
local end="$3" | |
:${end:=0} | |
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
int get_mac_addr(char *mac_addr) | |
{ | |
int sockfd; | |
struct ifreq ifr; | |
if ((sockfd = socket(AF_INET, SOCK_DGRAM, IPPROTO_IP)) >= 0) { | |
strncpy(ifr.ifr_name, "eth0", IFNAMESIZE); | |
ifr.ifr_addr.sa_family = AF_INET; | |
if (ioctl(sockfd, SIOGIFHWADDR, (char*) &ifr) == 0) { | |
sprintf(mac_addr, "%02X:%02X:%02X:%02X:%02X:%02X", |
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 <dirent.h> | |
int LoadFilesFromDir(char *pDirectory) | |
{ | |
struct dirent *pDirEnt; | |
DIR *pDir = opendir(pDirectory); | |
if (pDir != NULL) { | |
while ((pDirEnt = readdir(pDir))) { | |
char *file = NULL; | |
char Buffer[512]; |
NewerOlder