Skip to content

Instantly share code, notes, and snippets.

View ryesalvador's full-sized avatar

Rye Salvador ryesalvador

View GitHub Profile
@ryesalvador
ryesalvador / website-dl
Created October 29, 2020 06:33
A Bash script to download a full website using the wget command-line utility on Linux: https://youtu.be/pxdIjhTXqok
# A simple Bash script to download a full website using wget
#! /usr/bin/env bash
website=$1
echo $website
nohup wget --limit-rate=200k --no-clobber --convert-links --random-wait -r -p -E -e robots=off -U mozilla $website &
@ryesalvador
ryesalvador / kudos-install.txt
Created April 1, 2020 10:22
KuDOS bootdisk install guide
# Install NASM
$ sudo pacman -S nasm
# Then download source
$ git clone https://gist.github.com/ryesalvador/d274044c06beadb160f0158d0358ab1d kudos
# CD into the source directory
$ cd kudos
# Assemble the code to binary
@ryesalvador
ryesalvador / kudos-boot.asm
Created April 1, 2020 10:10
Ku-DOS Project bootloader
;KudOS bootdisk (c) Ryan Salvador 04-Jan-2015
bits 16 ;It says we want our code in real mode.
org 0
jmp 07c0h:begin ;The effective address of the start
;of our bootloader.
bootmsg db 'Ku-DOS bootdisk alpha v.1 (c) 2015-2020',10,13,'!Boot successful',10,13,'# ',0
@ryesalvador
ryesalvador / xpong.py
Last active October 24, 2022 06:40
A Python Curses Pong game for your terminal - https://youtu.be/TSmTMt2DM5g
""" XPONG - A Python Curses Pong game for your terminal
Copyright (C) 2020 Ryan Salvador
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 3 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
@ryesalvador
ryesalvador / tamagotchi.py
Last active January 22, 2024 10:35
Tamagotchi Emulator in PyGame
# Tamagotchi - A port of the Tamagotchi Emulator by aerospark: https://goo.gl/gaZ1fA
# Copyright (C) 2017 Ryan Salvador
# 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 3 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
@ryesalvador
ryesalvador / arrays.php
Created June 1, 2016 09:46
Creating an array in PHP
<?php
/* Adding items in an array implicitly. */
$junk[] = "hamburger";
$junk[] = "snack foods"; //This doesn't get displayed.
$junk[] = "pizza";
$junk[] = "carbonated beverage";
/* Adding items in an array explicitly. */
$junk[6] = "tacos";
@ryesalvador
ryesalvador / bit_struct.c
Created June 1, 2016 03:13
Using bitfields in storing struct members in C
#include <stdio.h>
/* A field for storing yes or no; uses 1 bit of storage. */
typedef struct {
unsigned int food:1;
unsigned int metal_music:1;
unsigned int dressy_clothes:1;
unsigned int football:1;
} likes;
@ryesalvador
ryesalvador / blasteroids_01.py
Created April 1, 2016 13:12
Source code for the "Make a Python 2D game using Pygame Tutorial #1" - https://youtu.be/adiRAQbVz_w
import pygame
SCREEN_WIDTH = 400
SCREEN_HEIGHT = 350
WHITE = (255, 255, 255)
pygame.init()
screen = pygame.display.set_mode([SCREEN_WIDTH, SCREEN_HEIGHT])
pygame.display.set_caption('Hello, World!')
@ryesalvador
ryesalvador / bochsrc.txt
Created October 9, 2015 04:06
Sample Bochs configuration file
# We give our system 32 Mb of RAM.
megs: 32
# This is the additional package we installed. We add it into our configuration.
display_library: sdl
# This emulates a physical device and loads our bootable IMG file into that device.
floppya: 1_44=Dos5.0.img, status=inserted
# We specify to boot from floppya.
@ryesalvador
ryesalvador / pizilla-pygtk.py
Last active November 17, 2021 02:11
Python + PyGTK + WebKit + Raspberry Pi
# pizilla-pygtk.py
import gtk, webkit
class window(gtk.Window):
def __init__(self):
super(window, self).__init__()
self.set_title("Pizilla-PyGTK")