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
| /* argvdump.c | |
| * Dumps all command line arguments | |
| * Useful for debugging programs that call other programs | |
| * Just create a symlink with the name of your target application. | |
| * The Lightning Stalker 2013 | |
| */ | |
| #include <stdio.h> | |
| int main (int argc, char **argv) |
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
| /* | |
| * Simple Caesar cypher algorithm | |
| * Preserves case and non-alpha characters | |
| * by The Lightning Stalker | |
| */ | |
| #include <stdio.h> | |
| #include <ctype.h> | |
| #define ALPHA 26 // letters in alphabet |
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
| /* | |
| * Computes wavelength of incident light | |
| * Formulas used: | |
| * Arctangent - atan(c / a) - thanks Cyparagon | |
| * Diffraction grating formula - nλ = d sin(ϴ) | |
| * Pythagorean theorem - a² + b² = c² | |
| * The Lightning Stalker 2013 | |
| */ | |
| #include <math.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
| /* compile with "gcc -Wall -opicloops picloops.c -lm" | |
| * | |
| * picloops.c - Calculate PIC microcontroller timing loops of 1-4 stages | |
| * using given inner loop overhead | |
| * | |
| * Time in seconds and clock speed in MHz shall be specified on the | |
| * command line in any order. For instance | |
| * $ ./picloops 4 60 | |
| * | |
| * Loosely based on picasm's pic loop calculator |
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> | |
| int main (int argc, char **argv) | |
| { | |
| int price = 1; | |
| while(1) | |
| { | |
| printf("Price has gone up from $%i to ", price); | |
| price++; | |
| printf("$%i\n", price); |
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> | |
| int main() { char *a,*s,*q; printf(s="int main() { char *a,*s,*q; printf(s=%s%s%s, q=%s%s%s%s,s,q,q,a=%s%s%s%s,q,q,q,a,a,q); return 0; }",q="\"",s,q,q,a="\\",q,q,q,a,a,q); return 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
| #include <stdio.h> | |
| int main (int argc, char **argv) | |
| { | |
| float i = 63.2, j = 63.2; | |
| int t; | |
| for (t = 0; t < 5; t++) | |
| { | |
| printf("%0.1f", j); |
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> // requires usblib | |
| #include <usb.h> // compile with #gcc -Wall -o resetusb resetusb.c -lusb | |
| int main(void) | |
| { | |
| struct usb_bus *busses; | |
| usb_init(); | |
| usb_find_busses(); | |
| usb_find_devices(); | |
| busses = usb_get_busses(); |
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
| /* | |
| * RPM calculator | |
| * Takes input from the keyboard | |
| * Uses the ncurses library | |
| * by The Lightning Stalker | |
| * | |
| * needs a rewrite to use clock_gettime(CLOCK_TAI, ...) | |
| * | |
| * Compile with gcc -Wall -o rpms rpms.c -lcurses | |
| */ |
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
| /* compile with "gcc -Wall -oseriesw seriesw.c -lm" | |
| * | |
| * Steps through possible pot settings and finds the wattage dissipated | |
| * by the pot and a series resistor. | |
| * - by The Lightning Stalker 2014 | |
| */ | |
| #include <math.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> |
OlderNewer