Skip to content

Instantly share code, notes, and snippets.

View JAChapmanII's full-sized avatar

Jeff Chapman II JAChapmanII

View GitHub Profile
import java.awt.Graphics;
import javax.swing.JComponent;
import javax.swing.JFrame;
class rect extends JComponent {
public static void main(String[] args) {
JFrame window = new JFrame();
window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
#!/bin/bash
print=0
while read line; do
echo "CERR: $line" 1>&2
if [[ "$(echo $line | cut -d':' -f3)" == "opencyc_jac" ]]; then
echo "CERR: to cyc: $(echo "$line" | cut -d':' -f4-)" 1>&2
echo "$line" | cut -d':' -f4-
fi
done | ./run-cyc.sh | while read oline; do
@JAChapmanII
JAChapmanII / pow!
Created September 16, 2012 00:17 — forked from anonymous/pow!
/* index of po2 works as follows:
po2[0] is base ^ 2^0
po2[1] is base ^ 2^1
po2[2] is base ^ 2^2
...
po[i] is base ^ 2^i
*/
int power(int base, int exp) {
int n = (exp+1)/2;
!push/azn/([b-df-hj-mp-tv-z])([^a-zA-Z]|$)/\1u\2/
!push/azn/([B-DF-HJ-MP-TV-Z])([^A-Za-z]|$)/\1U\2/
!push/desu/(\S+)/desu/
!push/cthulhu/[oe]/f'th/
!push/cthulhu/[ia]/gh/
!push/2012/.+/HERP DERP, END OF THE WORLD!
!push/2109/(\S+)/sustainable
!push/2ref/.*(\S+)$/STOUT SHAKO FOR TWO \U\1!
!push/amperdesert/./&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
!push/awyeah/(\S+)/*thrust*
#!/usr/bin/perl
if("catdog" =~ "/catdog/") {
print "match\n";
} else {
print "no match\n";
}
#!/usr/bin/perl
use strict;
use warnings;
my @arr = ("<f><e><e>stuff</e></e></f>" =~ /<f>(<e>((?1)|[^<>]+)<\/e>)<\/f>/g);
print join("\n", @arr);
print "\n";