Skip to content

Instantly share code, notes, and snippets.

View akbsteam's full-sized avatar

Andy Bennett akbsteam

View GitHub Profile
+ (UIImage *)backgroundImageWithFrame:(CGRect)frame baseColor:(UIColor *)baseColor {
UIImage *colorImage;
CGRect bounds = frame;
UIGraphicsBeginImageContextWithOptions(frame.size, NO, 0.0f);
CGContextRef context = UIGraphicsGetCurrentContext();
// Fill this path
[baseColor setFill];
CGContextAddRect(context, bounds);
@akbsteam
akbsteam / config.joy
Last active December 10, 2015 20:08 — forked from anonymous/config.joy
<config>
<joystick id="0">
<axis number="0" low="Left" high="Right" />
<axis number="1" low="Up" high="Down" />
<button number="0" key="SN2" />
<button number="1" key="SN1" />
<button number="2" key="HC1" />
<button number="3" key="HC2" />
<button number="4" key="HC3" />
<config>
<joystick id="0">
<axis number="0" low="Left" high="Right" />
<axis number="1" low="Up" high="Down" />
<button number="0" key="SN2" />
<button number="1" key="SN1" />
<button number="2" key="HC1" />
<button number="3" key="HC2" />
<button number="4" key="HC3" />
$(function() {
Parse.$ = jQuery;
// Initialize Parse with your Parse application javascript keys
Parse.initialize("APP-KEY",
"JAVASCRIPT-ID");
// The main view for the app
var AppView = Parse.View.extend({
el: $("#contact"),
Parse.Cloud.define("hello", function(request, response) {
var sendgrid = require("sendgrid");
sendgrid.initialize("USERNAME", "PASSWORD");
var name = request.params.name;
var email = request.params.email;
var phone = request.params.phone;
sendgrid.sendEmail({
to: "USER@DOMAIN.COM",
#include <Servo.h>
Servo twistServo; // Define left servo
Servo nodServo; // Define right servo
int twistPos = 0;
int nodPos = 0;
int maxNod = 180;
int minNod = 90;
#!/usr/bin/python
from Adafruit_PWM_Servo_Driver import PWM
import time
pwm = PWM(0x40)
pwm.setPWMFreq(50)
twist = 200
tDir = 1
#include <Wire.h>
#include <SoftwareSerial.h>
int tmp102Address = 0x48;
SoftwareSerial bleShield(2, 3);
long interval = 1000;
void setup(){
Serial.begin(19200);
//example use of LCD4Bit_mod library
#include <LCD4Bit_mod.h>
//create object to control an LCD.
//number of lines in display=1
LCD4Bit_mod lcd = LCD4Bit_mod(2);
//these pins can not be changed 2/3 are special pins
int encoderPin1 = 2;
int encoderPin2 = 3;
#!/usr/bin/python
from Adafruit_PWM_Servo_Driver import PWM
import time
class ServoControl(object):
current = 200
direction = 1
def __init__(self, pwm, pin, sMax, sMin):