Skip to content

Instantly share code, notes, and snippets.

View bradenbest's full-sized avatar

Braden Best bradenbest

View GitHub Profile
@bradenbest
bradenbest / img_viewer.md
Last active May 30, 2020 13:18
Image Viewer - JavaScript snippet to make it so you can view any image on a page at full resolution by clicking it
@bradenbest
bradenbest / table.md
Last active August 29, 2015 14:00
signed vs unsigned

The following is a table showing the difference between unsigned, signed, hexadecimal, and binary representations of the possible numbers in a 4-bit int.

unsigned signed hex binary sign bit
0 0 0 0000 0
1 +1 1 0001 0
2 +2 2 0010 0
3 +3 3 0011 0
4 +4 4 0100 0
5 +5 5 0101 0
@bradenbest
bradenbest / NG_API_example.php
Last active August 29, 2015 13:59
In this example, I try to explain the Newgrounds API
<?php
include('connect.php');
session_start();
// Note: this is pseudo-code since I don't have a reference handy right now. Don't actually try to use it
// I mean that the functions used here are likely to be fictionally named alternatives to the real function
// for example, exist() is not used to check $_POST's existence, it might not even be an existing function
if(exist($_POST)){