Skip to content

Instantly share code, notes, and snippets.

View Opus1no2's full-sized avatar
🏠
Working from home

Travis Tillotson Opus1no2

🏠
Working from home
View GitHub Profile
@Opus1no2
Opus1no2 / GetData.aspx
Created April 11, 2012 14:15
Brief example of how to receive GET data using C#
<%@ Page Language="C#" %>
<%
// Load NameValueCollection object.
NameValueCollection coll=Request.QueryString;
if (coll.Count > 0) {
// File where data will be written.
System.IO.StreamWriter file = new System.IO.StreamWriter("/path/to/test.txt");
@Opus1no2
Opus1no2 / WineMashup.php
Created April 11, 2012 18:16
Small Mashup of Ifbyphone and api.wine.com
<?php
/**
*
* A small mash-up of Ifbyphone and api.wine.com
*
* Returns a brief description of a wine label that is
* sent via SMS to an Ifbyphone number.
*
* Usage:
*
@Opus1no2
Opus1no2 / Ifbyphone_Audio.php
Created April 14, 2012 22:19
Convenience class for Ifbyphone audio API
<?php
/**
*
* Convenience class for using Ifbyphone recording API
*
* This class provides conveniant methods for using Ifbyphone
* recording API and can be expanded to include intelligent
* error handling based on the xml response from Ibyphone for
* any API call.
*
@Opus1no2
Opus1no2 / EmployeeValidationExample.php
Created October 19, 2012 16:29
Short example of how to receive data from an Ifbyphone IVR and send an XML response.
<?php
/**
*
* Short example of how receive post data from
* an Ifbyphone IVR and send a response after validation
*
* Example Usage:
*
* $example = new EmployeeValidationExample($_GET);
* echo $example->sendXmlResponse();
@Opus1no2
Opus1no2 / paresit.html
Created November 9, 2012 21:10
Simple url parser
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js" type="text/javascript"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.23/jquery-ui.min.js" type="text/javascript"></script>
</head>
<body>
<center>
<form>
@Opus1no2
Opus1no2 / DistributorData.php
Created November 30, 2012 16:27
CD Form Data
<?php
/**
*
* Usage:
*
* $dist = new DistributorData($_REQUEST);
*/
class DistributorData
{
/**
<?php
/**
*
* Inbound SMS
*/
function getSms($request)
{
$h = fopen('sms.txt', 'w');
if (isset($request['from_number'])) {
foreach ($request as $k => $v) {
<?php
/**
*
* Example
*/
class Survo_To_Sms
{
/**
* @var array $_IvrOptions
*/
@Opus1no2
Opus1no2 / CaesarCipher.php
Created April 16, 2013 21:36
Caesar Cipher
<?php
/**
* Caesar Cipher
*/
$msg = 'GUVFVFZLFRPERGZRFFNTR';
$key = 13;
$mode = 'decrypt';
@Opus1no2
Opus1no2 / CaesarHack.php
Created April 16, 2013 21:58
Caesar Hack
<?php
/**
* Caesar Hack
*/
$message = 'GUVFVFZLFRPERGZRFFNTR';
$letters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
for ($j = 0; $j < strlen($letters); $j++) {
$trans = '';
for ($i = 0; $i < strlen($message); $i++) {