Skip to content

Instantly share code, notes, and snippets.

Brett Jackson bjackson

Block or report user

Report or block bjackson

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@bjackson
bjackson / prime1.hs
Last active Jan 4, 2017
Prime generation
View prime1.hs
isqrt :: Int -> Int
isqrt = floor . sqrt . fromIntegral
genPrime :: Int -> Int
genPrime n =
[x | x <- 2 : [3, 5..], isPrime x] !! (n - 1)
isPrime :: Int -> Bool
isPrime 1 = False
isPrime n =
View keybase.md

Keybase proof

I hereby claim:

  • I am bjackson on github.
  • I am brettjackson (https://keybase.io/brettjackson) on keybase.
  • I have a public key whose fingerprint is D2EB 30A0 29FD 5B96 E47D 1FC0 5D17 EC5D D828 26AB

To claim this, I am signing this object:

@bjackson
bjackson / instr.md
Last active Mar 8, 2016
Git instructions
View instr.md

To start:

cd ece411
git clone https://github.com/ece411/IPI-mp3.git mp3

To make a change:

git add -A
git commit -m "<commit message>"
@bjackson
bjackson / Dockerfile
Created Dec 22, 2014
Mono, private git repo Dockerfile
View Dockerfile
FROM microsoft/aspnet:latest
MAINTAINER Brett Jackson "brett@brettjackson.org"
# Update aptitude with new repo
RUN apt-get update
# Install software
RUN apt-get install -y git wget
# Make ssh dir
@bjackson
bjackson / client.js
Last active Aug 29, 2015
Pipe output to browser
View client.js
var socket = io.connect();
socket.on('console', function (msg) {
console.log(msg);
});
View keybase.md

Keybase proof

I hereby claim:

  • I am bjackson on github.
  • I am brettjackson (https://keybase.io/brettjackson) on keybase.
  • I have a public key whose fingerprint is D2EB 30A0 29FD 5B96 E47D 1FC0 5D17 EC5D D828 26AB

To claim this, I am signing this object:

@bjackson
bjackson / install_sdl.sh
Created Sep 19, 2013
Install SDL on Mac for ECE 198KL MP4
View install_sdl.sh
# Will install homebrew, don't run this line if you have it already installed.
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)";
brew install sdl sdl_image sdl_ttf sdl_mixer sdl_net;
View Number of Ones.py
oneCount = 0
binNum = []
matchingbinNum = []
def numberOfOnes(binString):
if (binString.count('1') == 0 or binString.count('1') == 2 or binString.count('1') == 4):
print 'count = ' + str(binString.count('1'))
print binString
global oneCount
global matchingbinNum
You can’t perform that action at this time.