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
# setup.py | |
from distutils.core import setup | |
import py2exe, sys, os | |
from glob import glob | |
# The following code is a work around hack for excluded DLLs. | |
origIsSystemDLL = py2exe.build_exe.isSystemDLL | |
def isSystemDLL(pathname): | |
if os.path.basename(pathname).lower() in ["sdl_ttf.dll", |
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
# My Raspberry Pi HDMI video config for Toshiba Power TV CT-90384 | |
disable_overscan=1 | |
hdmi_force_hotplug=1 | |
config_hdmi_boost=4 | |
hdmi_drive=2 | |
hdmi_group=2 | |
hdmi_mode=16 |
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
#!/bin/bash | |
# Script from hackhappy.org | |
while [ true ] | |
do | |
sleep 20 | |
wget -q --spider http://www.google.com/ | |
if [ "$?" != 0 ]; then | |
sudo ifdown wlan0 && sudo ifup wlan0 |
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
# 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. |
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
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!') |
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> | |
/* 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; |
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
<?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"; |
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
;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 |
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
# 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 |
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
# pizilla-pygtk.py | |
import gtk, webkit | |
class window(gtk.Window): | |
def __init__(self): | |
super(window, self).__init__() | |
self.set_title("Pizilla-PyGTK") |
OlderNewer