Skip to content

Instantly share code, notes, and snippets.

@parsons-Jsr
parsons-Jsr / SentenceProject.java
Created November 9, 2012 02:14
Java Sentence Counter
/** Jamie Parsons' Sentence Counter Program*/
import java.awt.*; // Imports advance windows toolkit
import java.awt.event.*; // Imports package needed for ActionListener
import javax.swing.*; // Imports SWING package
import java.util.*; // Imports package for Arraylist
public class SentenceProject implements ActionListener // Class definition
{
JLabel infoLbl = new JLabel("Please enter your sentence below:"); // Creates a Label that gives instructions for the User
@parsons-Jsr
parsons-Jsr / FullDataBaseGenerator.java
Created November 9, 2012 02:17
Java Cinema Booking System
// Class that contains methods for Database manipulation
import java.awt.*;
//import javax.swing.*;
import java.awt.event.*;
import java.util.*;
import java.io.*;
public class FullDataBaseGenerator
@parsons-Jsr
parsons-Jsr / Python_FINAL
Created November 9, 2012 02:20
Python Queue Similation (Python COMPSCI Coursework)
import sys, os
import math
import random
def nextTime(mean):
from random import choice
# Giving x a random number from 0 to 1
x = random.random()
@parsons-Jsr
parsons-Jsr / decision.py
Created November 9, 2012 02:21
Python Basic Decision Maker using Random Module
import random
yes = 0
no = 0
choice = list(["yes", "no"])
accuracy = 1
print "------------------------------"
print " Jamie's Decision Maker"
print "------------------------------"
@parsons-Jsr
parsons-Jsr / pacman.py
Last active February 13, 2020 20:09
Python River Crossing Game (Pacman Style)
#RIVER CROSSING- PACMAN STYLE
#######DEPENDANCIES################################################################################
import os, sys # imports the standard python modules
import pygame # imports the pygame package along with any modules belonging to pygame
import Tkinter # imports Tkinter module
import tkMessageBox # Imports Tkinter textbox modules
pygame.init() # invokes pygame module
pygame.mixer.init() # invokes mixer module (for music playback)
pygame.mixer.music.load('pmandubstep.ogg') # load background music
@parsons-Jsr
parsons-Jsr / MeasureTime.java
Last active October 12, 2015 14:48
Java- Measuring Iteration time using nanoTime
import java.io.*;
import java.util.*;
class MeasureTime
{
public static void main (String[] args)
{
for (int i=1;i<100;i++)
{
@parsons-Jsr
parsons-Jsr / sensor.py
Created November 23, 2012 10:21
Raspberry Pi: Python script that activate LED on sensor detection (by JSRP)
import RPi.GPIO as GPIO
from time inport sleep
GPIO.setmode (GPIO.BOARD)
GPIO.Setup (7, GPIO.IN)
GPIO.Setup (11, GPIO.OUT)
while 1:
if GPIO.input(7):
GPIO.output(11, False)
@parsons-Jsr
parsons-Jsr / chromePrivateAlpha.bat
Last active December 15, 2015 18:49
Secret Chrome Terminal: Batch script that decrypts a portable version of Google chrome, runs it, then re-encrypts after session is over. Line breaks after "&&" are added for purpose of gist and need to be concatenated for real use
@echo off
REM -m (recursive), -d (decrypt), -b (use cached password), -f(fast mode), -z(encrypt), -t(destroy cached password)
start cmd.exe /k
"echo #######################################&&
echo JSRP Secret Chrome Encryption Terminal&&
echo #######################################&&
echo Secret Google Chrome Portable Decrypting&&
cd %ProgramFiles%\Axantum\Axcrypt&&
@parsons-Jsr
parsons-Jsr / FIRSTSETUP.bat
Last active December 15, 2015 18:58
Secret Chrome Terminal FINAL: Batch script that decrypts a portable version of Google chrome, runs it, then re-encrypts after session is over. v2 allows for line breaks in script as well as custom user paths. REQUIRES AXCRYPT AND GOOGLE CHROME PORTABLE
@echo off
REM JSRP GOOGLE CHROME PORTABLE WITH AXCRYPT ENCRYPTION SETUP SCRIPT
REM USER INSTALL PATHS (CHANGE IF CUSTOM INSTALL)
set axcryptInstallPath=Axcrypt
set chromePortablePath=GoogleChromePortable
IF EXIST %chromePortablePath%/GoogleChromePortable.exe echo NOTE: THIS SCRIPT WILL NOT WORK AGAIN AFTER BEING RUN ONCE
IF EXIST %chromePortablePath%/GoogleChromePortable.exe echo AS SUCH PLEASE DO NOT ALTER THE CHECK BOXES WHEN ENTERING YOUR PASSWORD
IF EXIST %chromePortablePath%/GoogleChromePortable.exe echo AND ENSURE THE PASSWORD IS CORRECT
IF EXIST %chromePortablePath%/GoogleChromePortable.exe echo ...
@parsons-Jsr
parsons-Jsr / EncryptedChrome.bat
Last active December 15, 2015 20:48
EncryptedChrome v0.7(Previously Secret Chrome w/ Encryption) Code includes batch file code for program only. The previous setup file has been replaced with IF statements as a switch. In Real World project- batch file exists as an exe. Also quiet mode is induced on said exe with attached jScript
@echo off
::JSRP ENCRYPTEDCHROME (GOOGLE CHROME PORTABLE WITH AXCRYPT ENCRYPTION) SCRIPT
::AXCRYPT ARGUMENTS (REFERENCE)
::-m (recursive), -d (decrypt), -b (use batch id), -f(fast mode), -z(encrypt), -t(destroy cached password)
::EDITVAR ARGUMENTS (REFERENCE)
::-p (pass), -m (mask input), -b (direct input to start of var), -o (set input to overwrite)
::USER INSTALL PATHS (CHANGE IF FOLDER NAMES CHANGE)