Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/python
#Using Python Version 2.7.3
#module used to do regular expressions
import re
#replace string with wireshark output
string = 'Digest username=\"infod\", realm=\"members only\", nonce=\"V8XwF3IRBQA=a0d05646a399aacfd52$
#Prompt to get user input
method = raw_input("Method (POST/GET): ")
@MrAwesomeness
MrAwesomeness / Guessing Game 1 - 100, Javascript
Created April 7, 2015 21:59
Guess a number between 1 and 100 game written in JavaScript. The code is compatible to run at http://repl.it/ and it has a built in cheat function that uses a binary search to find the answer
console.log('Guess a number from 1 to 100 or type "Cheat" to find the answer');
var answer = Math.floor((Math.random() * 100) + 1);
var i = 1;
//var c = 1;
function guessNum(answer){
var min = 0;
var max = 100;
var mid;
@MrAwesomeness
MrAwesomeness / Binary Search (Array)
Created April 7, 2015 22:03
Khan Academy Binary Search Challenge
/* Returns either the index of the location in the array,
or -1 if the array did not contain the targetValue */
var doSearch = function(array, targetValue) {
var min = 0;
var max = array.length - 1;
var guess;
var i = 1;
while (max >= min){
guess = Math.floor((max + min)/2);
@MrAwesomeness
MrAwesomeness / Tax Calculator for 2014
Created April 8, 2015 20:17
This is a quick and dirty Tax Calculator for 2014 for Utah Residents. It calculates your annual income after taxes, social security and medicare have been taken out. The code is written so it can be run at http://repl.it/
/*This is a Tax Calculator based off of 2014 information for married filing jointly
It assumes that you are filing a standard deduction and you made less than $152,525*/
var STANDARD_DEDUCTION = 12400;
var DEPENDENT_VALUE = 3950;
var tax1 = (18150 * 0.1);
var tax2 = ((73800 - 18150) * 0.15);
var tax3 = ((148850 - 73800) * 0.25);
var ficaMax = 117000;
@MrAwesomeness
MrAwesomeness / C# guessing game
Created June 2, 2015 21:10
C# guess a number from 1 to 100
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication1
{
class Program
{