Skip to content

Instantly share code, notes, and snippets.

View HoughIO's full-sized avatar
🖥️
Hacking'

Graham Hough HoughIO

🖥️
Hacking'
View GitHub Profile
@HoughIO
HoughIO / power.js
Created March 1, 2014 02:03
Wowhead JS
if (typeof $WH == "undefined") {
$WH = {
wowheadRemote: true
}
}
$WH.isTouch = function () {
if (!$WH.wowheadRemote && typeof Platform != "undefined") {
$WH.isTouch = function () {
return Platform.isTouch()
}
@HoughIO
HoughIO / lab14.py
Last active August 29, 2015 14:09
no idea
## Individual Lab 14
def main():
mydata = input("Filename? ")
try:
infile = open(mydata, "r")
except:
print("Can't open file")
return
#Graham Hough
#Section 15
#Program 4 Design
#program4design.py
#Purpose: To open files and read UPC codes, then print a reciept.
#Preconditions: Files contiaining inventory and upc codes to read
#Postconditions: None
#Preconditons: Files to call to open
#Postconditions: Program ends
@HoughIO
HoughIO / Arcade.ino
Created December 10, 2014 23:05
Ardunio
/*
Blink
Turns on an LED on for one second, then off for one second, repeatedly.
This example code is in the public domain.
*/
// Pin 13 has an LED connected on most Arduino boards.
// give it a name:
int led1 = 1;
@HoughIO
HoughIO / arcade.ino
Created December 11, 2014 03:04
Arcade.ino
bool _ABVAR_1_LED1;
bool _ABVAR_9_LED5;
int _ABVAR_6_;
int _ABVAR_8_;
int _ABVAR_13_;
bool _ABVAR_5_LED3;
int _ABVAR_10_;
bool _ABVAR_3_LED2;
int _ABVAR_11_;
bool _ABVAR_7_LED4;
Hey, did you know this has several files?
hu nu?
I added a few more lines for you to help. Also, this was forked.
-Graham
Hey, did you know this has several files?
hu nu?
#Name: Graham Hough
#Date due: 1/23/15
#Purpose: to show how to convert numbers to and from binary
def main():
user_num = input('Please type the corrisponding number: \n1. Binary to deciaml\n2. Decimal to binary\n')
if user_num == '1':
x = input('what is the number you want to convert?')
result1 = binary_to_dec(x)
print('The converted number is ' + str(result1))
elif user_num == '2':
@HoughIO
HoughIO / gist:3e10dfb0f473963c6bdc
Created February 16, 2015 17:09
pg errors log
/usr/bin/chef-solo:24:in `<main>'
[2015-02-16T17:03:07+00:00] ERROR: chef_gem[pg] (postgresql::ruby line 55) had an error: Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError)
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from extconf.rb:2:in `<main>'
Gem files will remain installed in /var/lib/gems/1.9.1/gems/pg-0.18.1 for inspection.
//course: CS216-00x
//Project: Lab Assignment 12
//Date: 11/28/2015
//Purpose: to build a parse tree which shows the relationships
// among operators and operands in an expression
// display the tree structure visually
//Author: (your name)
#include <string>
#include <sstream>