Skip to content

Instantly share code, notes, and snippets.

View optikalefx's full-sized avatar

Sean Clark optikalefx

View GitHub Profile
var Browser = require("zombie");
var assert = require("assert");
// Load the page from localhost
browser = new Browser()
browser.visit("https://sellercentral.amazon.com/gp/homepage.html", function (e,b) {
// Fill email, password and submit form
b.field("#email");
// awesome special event
// this adds the method every time you drop, shouldn't there be a way to just
// add this once to core $.event.drop ?
$.event.special.drop = {
add: function( handleObj ) {
var old_handler = handleObj.handler;
handleObj.handler = function( event ) {
console.log("every time?");
// Modify event object here!
if(this.particles.length) {
var i,
particles = this.particles,
length = particles.length;
//ctx.globalAlpha = 1;
for(i = 0; i < length; i++){
//ctx.globalAlpha = this.particles[i].opacity;
// Twitter Object
var Twitter = Social.inherit({
el : null,
api : "http://platform.twitter.com/anywhere.js?id=jU6TJqf8mVs4qEVidQdoWw&v=1.2",
_construct : function() {
if(location.hash && location.hash.indexOf("oauth_access_token") != -1) {
this.login();
}
},
login : function(e,el) {
function post() {
$post = $this->_safeMysql();
// shorten the description to 256 char
$desc = stripslashes(substr(implode(" ",$post['body']),0,256));
$title = stripslashes(stripslashes($post['title']));
$attachment = array(
'message' => $title,
'name' => 'NewsUp',
@optikalefx
optikalefx / html
Created September 21, 2012 21:28
html
<table>
<tr>
<th col="Username">Username</th>
<th col="FirstName">First Name</th>
<th col="Lastname">Last Name</th>
<th col="Email">Email</th>
</tr>
</table>
@optikalefx
optikalefx / HTML Setup.html
Last active October 10, 2015 22:58
OpenJSGrid v2
<table class="users" action="ajax.php">
<tr>
<th col="Username">Username</th>
<th col="FirstName">First Name</th>
<th col="Lastname">Last Name</th>
<th col="Email">Email</th>
</tr>
</table>
@optikalefx
optikalefx / ajax.php
Last active October 10, 2015 23:18
Deleting
<?php
require_once("grid.php");
$grid = new Grid("users", array(
"delete"=>true
));
?>
@optikalefx
optikalefx / ajax.php
Last active October 10, 2015 23:18
Editing
<?php
require_once("grid.php");
$grid = new Grid("users", array(
"save"=>true
));
?>
@optikalefx
optikalefx / test.php
Created September 26, 2012 04:25
a test
<?php
echo "hello";
?>