Skip to content

Instantly share code, notes, and snippets.

View itguy51's full-sized avatar

Rebecca Pruim itguy51

  • San Diego, California
View GitHub Profile
@itguy51
itguy51 / pin.vbs
Created July 13, 2015 14:31
VBScript to config pinned items.
Const CSIDL_COMMON_PROGRAMS = &H17
Const CSIDL_PROGRAMS = &H2
Const OfficeDir = "Microsoft Office"
Set objShell = CreateObject("Shell.Application")
Set objAllUsersProgramsFolder = objShell.NameSpace(CSIDL_COMMON_PROGRAMS)
strAllUsersProgramsPath = objAllUsersProgramsFolder.Self.Path
Set objFolder = objShell.Namespace(strAllUsersProgramsPath & "\" & OfficeDir)
Set startFldr = objShell.Namespace(strAllUsersProgramsPath)
Set accFldr = objShell.Namespace(strAllUsersProgramsPath & "\Accessories")
@itguy51
itguy51 / ece09.cpp
Created April 29, 2015 04:24
ECE 114 09
#include "include.h"
int main(){
while (true)
{
std::cout << "1. Plane Passengers\n2. SNR calculator\n3. Taylor Series\n4. Exit\n\nEnter Choice: ";
int choice;
std::cin >> choice;
if (choice == 1)
{
@itguy51
itguy51 / ece114_02.cpp
Created April 8, 2015 04:01
ECE114_02
//Standard iostream include (get cin/cout)
#include <iostream>
//Commented out, I just live with .
using namespace std;
int main(){
int i1, i2, i3, i4, i5, i6, i7, i8;
float f1, f2;
//Read In.
cout << "Enter 2 numbers: ";
//Declare Pin Numbers here.
int turnType = 0; //Right Turn
void setup(){
//set up!
}
void loop(){
if(distanceGetCm() > 15 && maskCheckLightSensor(0,0,0)){
//go forward
}else if(distanceGetCm() < 15 && maskCheckLightSensor(0,0,0)){
@itguy51
itguy51 / limit-definition.tex
Created October 30, 2014 19:53
The Quotient Rule - Proofs (For Green's MAT114 Class)
\documentclass[10pt]{article}
\pagestyle{plain}
\usepackage{amsmath}
\usepackage[margin=0.25in]{geometry}
\usepackage{parselines}
\begin{document}
\iffalse
Josh Pruim wrote this. For Green's class. In October.
\fi
\noindent
@itguy51
itguy51 / paths.sh
Last active August 29, 2015 14:03
OS X Path Management
#!/bin/sh
#paths
#For Mac OS X
#MIT Licensed
#2014 Josh Pruim
#
#This adds an entry to /etc/paths.d
#Accepts 1/2/3 parameters
#paths add <path name> <path>
#paths remove <path name>
@itguy51
itguy51 / xcode.sh
Created May 27, 2014 05:20
Jailbreak SSH+Open solution for iOS Development
#!/bin/sh
#Build iOS app, sling and run.
#Cuz why the hell not?
#Set HOSTNAME_IOS to the iPhone/iPad/iPod's IP address
#Ensure you have open and OpenSSH with key-based auth configured.
#Add this as the last BUILD STEP
#Have ldid in ~/
HOSTNAME_IOS=192.168.1.81
KILLCOMMAND="killall ${EXECUTABLE_NAME}"
RMCOMMAND="rm -r /Applications/${EXECUTABLE_NAME}.app"
@itguy51
itguy51 / run.sh
Created December 17, 2013 21:52
Setup out Pis
#!/bin/sh
git clone https://github.com/jbaiter/pyomxplayer.git
cd pyomxplayer
sudo python setup.py install
cd ..
rm run.py
wget https://gist.github.com/itguy51/8013222/raw/ba8ef11f4f34902dfcf4beab2494f01e983a41c6/run.py
@itguy51
itguy51 / run.py
Created December 17, 2013 21:51
bah
import RPi.GPIO as GPIO
import os
import time
from pyomxplayer import OMXPlayer
GPIO.setmode(GPIO.BCM)
GPIO.setup(22, GPIO.IN)
GPIO.setup(4, GPIO.OUT)
GPIO.output(4, GPIO.HIGH)
last = 0
@itguy51
itguy51 / gcode.py
Last active December 21, 2015 08:28
GCode Python Library, Rough Phase 1.
def circleCW(radius, cx, cy, cz, sinkDepth, bitRadius=0):
radius = radius-bitRadius
print "G00 X" + str(cx-radius) + " Y"+str(cy)
print "G01 Z" + str(cz-sinkDepth)
print "G02 X" + str(cx-radius) + " Y"+str(cy) + " R" + str(radius)
print "G02 X" + str(radius+cx) + " R" + str(radius)
print "G02 X" + str(cx-radius) + " R" + str(radius)
print "G01 Z" + str(cz)
def toolToPosition(tx, ty):