Skip to content

Instantly share code, notes, and snippets.

View banderson623's full-sized avatar

Brian Anderson banderson623

  • Gain Compliance
  • Rocklin, CA
View GitHub Profile
@banderson623
banderson623 / pandoras_vox.mdown
Created March 9, 2016 15:24 — forked from kolber/pandoras_vox.mdown
pandora’s vox: on community in cyberspace

pandora’s vox: on community in cyberspace

by humdog (1994)

when i went into cyberspace i went into it thinking that it was a place like any other place and that it would be a human interaction like any other human interaction. i was wrong when i thought that. it was a terrible mistake.

the very first understanding that i had that it was not a place like any place and that the interaction would be different was when people began to talk to me as though i were a man. when they wrote about me in the third person, they would say “he.” it interested me to have people think i was “he” instead of “she” and so at first i did not say anything. i grinned and let them think i was “he.” this went on for a little while and it was fun but after a while i was uncomfortable. finally i said unto them that i, humdog, was a woman and not a man. this surprised them. at that moment i realized that the dissolution of gender-category was something that was happening everywhere, and perhaps it was only just very obvious on the

class Cricket
{
static void Main(string[] args)
{
bool condition1 = true;
bool condition2 = true;
bool condition3 = true;
bool condition4 = true;
bool condition5 = true;
def trivial_method(a,b)
if a
true
else
false
end
end
# convert to
@banderson623
banderson623 / hasy.rb
Created November 8, 2013 18:47
hashy
def do_something(a,b={})
puts "a is: " + a.to_s
puts "b is: " + b.inspect
end
do_something("hi")
do_something("Hello",{:cool_guy => "Levi"})
do_something("Hello",:cool_guy => "Levi")
class Object
def try_or_else(method_name,else_thing)
return self.public_send(method_name)
rescue NoMethodError
return else_thing
end
end
@banderson623
banderson623 / functions.scm
Created August 9, 2013 22:12
stupid scheme...
(define empty-stack-v (lambda () (vector) ))
(define empty-stack-v? (lambda(stack) (equal? stack (empty-stack-v))))
(define push-v (lambda (stack item)
(if (eqv? stack (empty-stack-v)) (vector item)
(vector-append (vector item) stack))
))
(define pop-v (lambda (stack)
(if (equal? stack (empty-stack-v))
@banderson623
banderson623 / oscillate.html
Created August 9, 2013 04:53
Silly little visual oscillator written in javascript. I even wrote some primitive easing code.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title>Test</title>
</head>
<body>
<canvas id="canvaz" width="400" height="400" />
</body>
<script type="text/javascript" charset="utf-8">
@banderson623
banderson623 / search_hack.rb
Last active December 20, 2015 10:58
Same rails search
module ActiveRecord
class Base
# Just hack this in, since I don't have AR 4.0 installed
def self.where(*attrs)
puts attrs.inspect
end
def self.table_name
"erics_models"
end
@banderson623
banderson623 / _shell_command.sh
Last active December 18, 2015 23:19
Oh crap! Many zero sized files after copying from remote server, over vpn, through virtual machine to my iMac :( Command line + ruby to the rescue!
find . -type f -size 0 > bad_files.txt
@banderson623
banderson623 / pipedThreadPool.c
Created June 12, 2013 22:17
Using POSIX pipes and pthreads to make a basic threadPool in C. Its rough, proof of concept for a more efficient game of life in C, using threads.
//
// You will need to use -lpthreads in your make command
// 'cc pipedThreadPool.c -lpthreads -o test'
//
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>