Skip to content

Instantly share code, notes, and snippets.

David Pennington Xeoncross

Block or report user

Report or block Xeoncross

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
Xeoncross /
Last active Aug 29, 2015
Things I'm learning about writing a facebook canvas application
  • You must setup an SSL cert to make your life easy.

  • Create a fake app.localhost.loc virtual host or something by editing your /etc/hosts or windows hosts file and pointing that domain to and then editing your nginx or Apache config.

  • For FB login You can't do a header() redirect because of X-Frame-Options. Use Javascript instead:

      <html><script>top.location.href = "loginUrl";</script></html>
  • All requests that should be HTTP GET will become POST requests.

# If it redirects to at the end, wait a few minutes and try again
EMAIL='YOUR_EMAIL' # edit this
PASS='YOUR_PASSWORD' # edit this
View facebook.php
class FacebookBase {
public static $curlOpts = array(
CURLOPT_USERAGENT => 'facebook-php',
Xeoncross / scrape.js
Created Mar 19, 2014
large scalle node.js website scrapping
View scrape.js
2.9M Websites Downloaded -> 16.3 Minutes
Patrick McConlogue
Votes by Christian Hochfilzer, Nervan Andrew, Tek Neeque, and Grahesh Parkar.
Per my last post I discussed how to scrape at scale. While there is a tricky memory leak in this, here is the script (for "ring".com) to download and get the pagerank for almost three million websites based on a maximum of 500000 queries.
Essentially, whatever you put into the "list.txt" file will be scrape and the top 10 results will be downloaded in JSON.
View httpclient.go
package httpclient
import (
type Config struct {
ConnectTimeout time.Duration
View MimeMailParser.class.php
* Fast Mime Mail parser Class using PHP's MailParse Extension
* @author
* @url
* @license
* @version $Id$
View fb-parse-feed-curl.php
* Facebook Page Feed Parser
* @using cURL
function fb_parse_feed( $page_id, $no = 5 ) {
// URL to the Facebook page's RSS feed.
View ocp.php
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)
Author: _ck_ (with contributions by GK, stasilok)
Version: 0.1.6
Free for any kind of use or modification, I am not responsible for anything, please share your improvements
* revision history
0.1.6 2013-04-12 moved meta to footer so graphs can be higher and reduce clutter
0.1.5 2013-04-12 added graphs to visualize cache state, please report any browser/style bugs
View sslclient.php
class SSLSocket {
public $s = null;
public $on_err = null;
public $on_read = null;
public $on_readComplete = null;
public $on_timeout = null;
public $on_write = null;
public $endpoint = null;
public $wbuffer = array();
public $timer = null;
View composer.json
"require": {
"php": ">=5.5.0",
"christiaan/stream-process": "1.0.*",
"mkraemer/react-inotify": "dev-master",
"mkraemer/react-pcntl": "dev-master"
You can’t perform that action at this time.