Skip to content

Instantly share code, notes, and snippets.

View ja6z's full-sized avatar
🗺️
On vacation

joel arraez ja6z

🗺️
On vacation
View GitHub Profile
@ja6z
ja6z / login.php
Last active August 29, 2015 14:21
<?php
if(isset($_SESSION['authentication'])){?>
<script type="text/javascript">
<!--
window.location = "main.php"
//-->
</script>
You're already logged in, redirecting you.
<?php }else{
/*jslint continue:true*/
/**
* Adapted from {@link http://www.bulgaria-web-developers.com/projects/javascript/serialize/}
* Changes:
* Ensures proper URL encoding of name as well as value
* Preserves element order
* XHTML and JSLint-friendly
* Disallows disabled form elements and reset buttons as per HTML4 [successful controls]{@link http://www.w3.org/TR/html401/interact/forms.html#h-17.13.2}
* (as used in jQuery). Note: This does not serialize <object>
* elements (even those without a declare attribute) or
@zester
zester / main.cpp
Created August 29, 2011 03:46
Skia Graphics Library Example (Note: Use to work)
#include "SkCanvas.h"
#include "SkGraphics.h"
#include "SkImageEncoder.h"
#include "SkString.h"
#include "SkTemplates.h"
int main (int argc, char * const argv[]) {
//
SkAutoGraphics ag;
var express = require('express'),
app = express.createServer(),
sio = require('socket.io'),
redis = require("redis"),
client = redis.createClient(),
io = null;
/**
* Used to parse cookie
*/