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
<html> | |
<head> | |
<title>Dithering Test</title> | |
</head> | |
<body> | |
<canvas></canvas> | |
<script> | |
var canvas = document.getElementsByTagName("canvas")[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
(function(){var m = "@-webkit-keyframes super-rainbow { 0% { -webkit-filter:hue-rotate(1deg); } 100% { -webkit-filter:hue-rotate(360deg); } } html { -webkit-animation: super-rainbow 2s linear infinite normal }"; | |
var styletag = document.createElement("style"); | |
styletag.textContent = m; | |
document.body.appendChild(styletag); | |
}()); |
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 java.util.*; | |
import java.lang.Math.*; | |
import java.text.*; | |
public class artillery { | |
private static Random rand = new Random(); // We use this to generate random numbers | |
public static String input(String s) { | |
/* input() simplifies the process of asking for input |
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
A trick to autheticate on connection to an IRC server | |
/connect irc.freenode.net 6667 :<username> <password> | |
In xchat, this means you put :<username> <password> into the server password box. |
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
(function(){ | |
/* Set up */ | |
var input = jQuery("#inputfield"); | |
var space_key = jQuery("#config_input_key").attr("value"); | |
var chars_typed_so_far = 0; | |
/* Set this as desired */ | |
var desired_WPM = 150; |
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
/* | |
Recursively searches the document, and the iframes within it for elements. | |
Usage: exactly like jQuery() or $() | |
*/ | |
var $$$ = function(thing, doc) { | |
var res = $(thing, doc); | |
$("iframe", doc).each( function(){ | |
res = res.add( $$$(thing, this.contentDocument) ); | |
}); |
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
PS1=$'\n\[\e[1;32m\]\xe2\x94\x8c[ \[\e[1;37m\]\u\[\e[32m\]@\[\e[1;37m\]\h\[\e[32m\] ]\xe2\x94\x80\xe2\x94\x80( \[\e[37m\]\w\[\e[32m\] )\n\xe2\x94\x94\xe2\x94\x80[\[\e[0;31m\]>>> \[\e[0m\]' |
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, sys, time, random, math | |
from pygame.locals import * | |
# this paragraph is just your standard pygame stuff | |
pygame.init() | |
screen_width = 640 | |
screen_height = 480 | |
screen = pygame.display.set_mode((screen_width, screen_height), RESIZABLE, 32) | |
pygame.display.set_caption("Shooter test") | |
screen.fill((0, 0, 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
===================== | |
Frozen Chicken: | |
===================== | |
1 Preheat oven to 375. | |
2 Spray baking dish with non-stick spray. | |
3 Place frozen chicken breast in dish. | |
4 Top with sauce. | |
5 Bake for 45 minutes. | |
6 Options: Add veggies for a one dish meal. |
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 java.util.*; | |
public class CombSort { | |
public static void sort(int[] array, int size) { | |
/* | |
This function sorts a list in-place using CombSort11. | |
It works exactly like BubbleSort except that instead of | |
looking at i and i+1 when iterating, it looks at i and i+gap. | |
This helps reposition small values stuck at the end of the array. |
NewerOlder