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
--sandbox_writable_path=/home/$USER/.ccache |
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
Use --sandbox_debug to see verbose messages from the sandbox | |
ccache: error: Failed to create temporary file for /home/satish/.ccache/tmp/trees.stdout: Read-only file system |
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/python | |
# except for the top level directory we ignore | |
# hidden files and directories by default | |
# arg1 : directory arg2 : outputfile.png | |
import sys | |
import os | |
import os.path | |
import networkx as nx | |
import matplotlib.pyplot as plt |
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 main (int argc, char **argv) | |
{ | |
int fd, i, block, blocksize, bcount, prev_block, frag_count=0; | |
struct stat st; | |
assert (argv[1] != NULL); | |
assert (fd = open (argv[1], O_RDONLY)); | |
assert (ioctl (fd, FIGETBSZ, &blocksize) == 0); | |
assert (!fstat (fd, &st)); | |
bcount = (st.st_size + blocksize - 1) / blocksize; | |
printf ("File: %s Size: %d Blocks: %d Blocksize: %d\n", |
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 * string_indices= break_by_spaces("A String of words"); | |
for(i=0; *(string_indices + i) != -1; i++){ | |
fprintf(stdout, "[%d] %d %s \n", i, *(string_indices + i), (char *)(argv[1] + *(string_indices + i))); | |
} |
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 * break_by_spaces(char * arg){ | |
if(strlen(arg) <= 0 || (strlen(arg) ==1 && *arg == ' ')){ | |
return NULL; | |
} | |
int * retval = malloc((strlen(arg) -1)*sizeof(int)); | |
int * temp = retval; | |
int counter = 0; | |
if(retval == NULL){ | |
perror("malloc"); | |
exit(EXIT_FAILURE); |
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 <numa.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
int main(int argc, char **argv){ | |
long free; | |
int num_cpus = 4; | |
long node_size = -1L; | |
int i; |
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 <utmpx.h> | |
#include <paths.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
int main(int argc, char **argv){ | |
struct utmpx data; | |
FILE *log_file = fopen(_PATH_UTMP, "r"); | |
memset(&data, 0, sizeof(struct utmpx)); |
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
/* The structure describing an entry in the user accounting database. */ | |
struct utmpx | |
{ | |
short int ut_type; /* Type of login. */ | |
__pid_t ut_pid; /* Process ID of login process. */ | |
char ut_line[__UT_LINESIZE]; /* Devicename. */ | |
char ut_id[4]; /* Inittab ID. */ | |
char ut_user[__UT_NAMESIZE]; /* Username. */ | |
char ut_host[__UT_HOSTSIZE]; /* Hostname for remote login. */ | |
struct __exit_status ut_exit; /* Exit status of a process marked as DEAD_PROCESS. */ |
NewerOlder