Skip to content

Instantly share code, notes, and snippets.

@mr-fool
mr-fool / roulette.c
Created October 14, 2014 16:01
Add file i/o to my old russian roulette program
/* A Russian Roulette Game */
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
#include <termios.h>
#include <fcntl.h>
/* prototypes */
void introduction( int a);
@mr-fool
mr-fool / Makefile
Last active August 29, 2015 14:07
file i/o C practice
allFiles: fee.c
gcc -Wall fee.c -o fee.out -lm
clean:
rm *.o fee.out
@mr-fool
mr-fool / yu_gi_oh.c
Last active August 29, 2015 14:06
yu gi oh card game
/*Yu Gi Oh Card Game*/
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
/* prototypes */
void introduction();
void game();
void credit();
@mr-fool
mr-fool / web_crawler.py
Created September 14, 2014 18:02
simple python 3 web crawler
import sys
import requests
import os
from bs4 import BeautifulSoup
def main():
os.system('clear') # on linux / os x
#Gathering necessary input from user
choice = int( input("1 to use the basic function, 2 for the advance crawling, 3 for exit\n") )
@mr-fool
mr-fool / Makefile
Last active August 29, 2015 14:05
Russian Roulette
allFiles: roulette.c
gcc -Wall roulette.c -o roulette.out -lm
clean:
rm *.o roulette.out
@mr-fool
mr-fool / roulette.sh
Created August 31, 2014 23:59
Russian Roulette
[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live”
@mr-fool
mr-fool / Makefile
Last active August 29, 2015 14:04
Statistic Tool
allFiles: statistic.c
gcc -Wall statistic.c -o statistic.out -lm
clean:
rm *.o statistic.out
@mr-fool
mr-fool / Makefile
Last active August 29, 2015 14:04
histogram in c
allFiles: histogram.c
gcc -Wall histogram.c -o histogram.out -lm
clean:
rm *.o histogram.out
@mr-fool
mr-fool / Makefile
Last active August 29, 2015 14:03
A guessing game: practicing generating random number and goto statement
allFiles: guess.c
gcc -Wall guess.c -o guess.out -lm
clean:
rm *.o guess.out
@mr-fool
mr-fool / print.asm
Created June 19, 2014 16:59
x86 asm in tasm sytnax
;simple print program
;testing variable declaration and simple print
;testing print i/o
;easiest program to see whether or not it is assembled correct
;if it is not assembled correctly, there the output will be wrong
;standard header
.model tiny
.data
hello db "hello$" ; creating a variable hello with the string hello
.code