Skip to content

Instantly share code, notes, and snippets.

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

Anthony Catel paraboul

🏠
Working from home
View GitHub Profile
@paraboul
paraboul / client-side.js
Created February 22, 2011 08:58
APE SSH
/***************** Client-side ********************/
APE.ssh = new Class({
Extends: APE.Client,
initialize: function(container){
this.term = null;
this.addEvent('load', this.start);
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
struct parent {
int foo;
char *bar;
};
<html>
<head></head>
<body>
<?ape
var x = 'foo' // some javascript
Ape.async('<img src="load.gif" />', Ape.mysql.query('SELECT foo FROM bar', function(res) {
echo(res[0].foo + ' yeahhhh');
}))
?>
</body>
<?php
gc_enable();
class Ape_dispatcher
{
private $_socks = array();
private $_socks_write = array();
private $_timers = array();
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" dir="ltr" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="demo.css" media="screen" title="Normal" />
<script type="text/javaScript" src="../../Clients/JavaScript.js"></script>
<script type="text/javaScript" src="../config.js"></script>
</head>
<body>
switch(*(int *)data) {
case 542393671: /* GET + space */
http->type = HTTP_GET;
break;
case 1414745936: /* POST */
http->type = HTTP_POST;
break;
default:
http->error = 1;
return;
/*
Copyright (C) 2006, 2007, 2008, 2009 Anthony Catel <a.catel@weelya.com>
This file is part of APE Server.
APE is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
APE is distributed in the hope that it will be useful,
/*
Copyright (C) 2006, 2007, 2008, 2009 Anthony Catel <a.catel@weelya.com>
This file is part of APE Server.
APE is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
APE is distributed in the hope that it will be useful,