This file contains 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
s |
This file contains 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
### | |
# | |
# Preseed for a Debian based machine on kvm | |
# | |
# Boot this file with: press TAB on the installer | |
# add the following to the boot parameters: | |
# | |
# install keymap=en_US locale=en_US netcfg/get_hostname=testserve \ | |
# netcfg/get_domain=carfax.eu preseed/url=http://192.168.XXX.XXX:8000/wheezy.preseed | |
# |
This file contains 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
/* Test for hanged mounts */ | |
#include <stdio.h> | |
#include <signal.h> | |
#include <string.h> | |
#include <sys/stat.h> | |
#include <time.h> | |
#include <sys/time.h> | |
#include <sys/wait.h> | |
#include <stdlib.h> | |
#include <unistd.h> |
This file contains 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 <regex.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
int main(int argc, char *argv[]){ | |
regex_t regex; | |
int reti; | |
char msgbuf[100]; | |
size_t max_groups = 1; |
This file contains 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 | |
#include <string.h> | |
#include <time.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <locale.h> | |
// in main() | |
int |
This file contains 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
cronjob: | |
======== | |
* 1 * * * rsync -e 'ssh -v -i .ssh/log_coll_id_rsa logcol@server' -aP /var/log/mongodb/*.s server:. | |
### There results: | |
On the server called server you will see in the home directory of the ssh user you created a directory with the log files for each host | |
you installed the ssh key, the script and the cron job. | |
ls ~ |
This file contains 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 <string.h> | |
#include <errno.h> | |
int main(int argc, char *argv[]) | |
{ | |
char* to_convert = argv[1]; | |
char* p = NULL; |
This file contains 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 <string.h> | |
/* demonstrate pass by reference of an array of integers*/ | |
void resize( int **p, int size ) { | |
free( *p ); | |
*p = (int*) malloc( size * sizeof(int) ); | |
int tocpy[]= {8}; |
This file contains 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 <string.h> | |
/* demonstrate pass by reference of an array of integers*/ | |
void resize( int **p, int size ) { | |
free( *p ); | |
*p = (int*) malloc( size * sizeof(int) ); | |
int tocpy[]= {8}; |
This file contains 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/sh | |
CONFIG_FILE=$1 | |
source $CONFIG_FILE | |
cd $PROJECT_DIR | |
export PATH=/usr/local/bin:$PATH | |
OlderNewer