Skip to content

Instantly share code, notes, and snippets.

View aonic's full-sized avatar

Raja Kapur aonic

  • AWS
  • Seattle, WA
View GitHub Profile

MAIL TO PRINTER GATEWAY

sudo adduser autoprint
sudo apt-get install fetchmail postfix

/etc/default/fetchmail

START_DAEMON=yes
@aonic
aonic / gist:8429390
Last active January 3, 2016 07:29 — forked from anonymous/gist:8414867
(function($) {
var validate_rules = {
user: function(value) {
var reg = /^[a-z0-9\_\-\@\.]{1,32}$/;
if (reg.test(value) === false) {
return "Invalid";
}
},
<?php
/**
* OAuth 2.0 Password grant
*
* @package php-loep/oauth2-server
* @author Alex Bilbie <hello@alexbilbie.com>
* @copyright Copyright (c) 2013 PHP League of Extraordinary Packages
* @license http://mit-license.org/
* @link http://github.com/php-loep/oauth2-server
*/
<?php
/* connect to gmail */
$hostname = '{imap.gmail.com:993/imap/ssl}INBOX';
$username = 'dispatch@gbfd.net';
$password = '';
/* try to connect */
$inbox = imap_open($hostname,$username,$password) or die('Cannot connect to Gmail: ' . imap_last_error());
/* grab emails */
@aonic
aonic / gist:828284
Created February 15, 2011 21:26 — forked from anonymous/gist:828273
<?php
//ICE //William Mantly //willaim@aonic.net //5-2-07
//session_start();
if("4"=="4"){
include("mysql.php"); //conects to D
array_map('addslashes', $_GET);
/**
*
*/
package example05;
import java.util.Scanner;
/**
* @author pajensen