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
main(argc, argv) | |
int argc; | |
char *argv[]; | |
{ | |
int i; | |
argc--; | |
for(i=1; i<=argc; i++) | |
printf("%s%c", argv[i], i==argc? '\n': ' '); | |
} |
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
;SMBDIS.ASM - A COMPREHENSIVE SUPER MARIO BROS. DISASSEMBLY | |
;by doppelganger ([email protected]) | |
;This file is provided for your own use as-is. It will require the character rom data | |
;and an iNES file header to get it to work. | |
;There are so many people I have to thank for this, that taking all the credit for | |
;myself would be an unforgivable act of arrogance. Without their help this would | |
;probably not be possible. So I thank all the peeps in the nesdev scene whose insight into | |
;the 6502 and the NES helped me learn how it works (you guys know who you are, there's no |
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
section .text | |
global _start | |
_start: | |
xor eax, eax | |
xor ebx, ebx | |
xor esi, esi | |
jmp _socket | |
_socket_call: |
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
# This simple script helps to setup a basic PXE Server in an existing | |
# environment on a Fedora-based system. | |
# | |
# Licensed under GPLv2 | |
# | |
# Copyright (c) 2013 Fabian Affolter <fabian at affolter-engineering.ch> | |
TFTP_PATH=/var/lib/tftpboot | |
yum -y install tftp-server syslinux |
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
LD SP,$fffe ; $0000 Setup Stack | |
XOR A ; $0003 Zero the memory from $8000-$9FFF (VRAM) | |
LD HL,$9fff ; $0004 | |
Addr_0007: | |
LD (HL-),A ; $0007 | |
BIT 7,H ; $0008 | |
JR NZ, Addr_0007 ; $000a | |
LD HL,$ff26 ; $000c Setup Audio |
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 700 | |
#include <signal.h> | |
#include <unistd.h> | |
int main() | |
{ | |
sigset_t set; | |
int status; | |
if (getpid() != 1) return 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
// Just before switching jobs: | |
// Add one of these. | |
// Preferably into the same commit where you do a large merge. | |
// | |
// This started as a tweet with a joke of "C++ pro-tip: #define private public", | |
// and then it quickly escalated into more and more evil suggestions. | |
// I've tried to capture interesting suggestions here. | |
// | |
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, | |
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, |
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
qApp->setStyle(QStyleFactory::create("Fusion")); | |
QPalette darkPalette; | |
darkPalette.setColor(QPalette::Window, QColor(53,53,53)); | |
darkPalette.setColor(QPalette::WindowText, Qt::white); | |
darkPalette.setColor(QPalette::Base, QColor(25,25,25)); | |
darkPalette.setColor(QPalette::AlternateBase, QColor(53,53,53)); | |
darkPalette.setColor(QPalette::ToolTipBase, Qt::white); | |
darkPalette.setColor(QPalette::ToolTipText, Qt::white); | |
darkPalette.setColor(QPalette::Text, Qt::white); |
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
(use-modules (ice-9 pretty-print)) | |
;; Helper methods for maintaining comments and whitespace. | |
(define (copy-line-comment) | |
(let ((char (read-char))) | |
(if (not (eof-object? char)) | |
(if (eq? char #\newline) | |
(newline) | |
(begin (write-char char) (copy-line-comment)))))) | |
(define (maintain-empty-lines) |
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
; src/boot/boot.asm | |
; Bootloader to load kernel, switch to 32-bit protected mode and execute kernel | |
[BITS 16] ; 16-bit real mode | |
[ORG 0x7C00] ; Loaded into memory at 0x7C00 | |
MOV [bootDrive], DL ; Store DL (boot drive number) in memory | |
MOV BP, 0x9000 ; Move Base Pointer in free memory space | |
MOV SP, BP ; Move Stack Pointer to base of stack |
OlderNewer