Skip to content

Instantly share code, notes, and snippets.

View seinoxygen's full-sized avatar

Pablo Cornehl seinoxygen

View GitHub Profile
@seinoxygen
seinoxygen / fb-subscription.htm
Created October 20, 2014 16:22
Suscribe via Facebook Connect
<div id="fb-root"></div>
<script src="http://connect.facebook.net/es_ES/all.js"></script>
<script>
$(document).ready(function(){
FB.init({
appId : 'APP_ID',
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
@seinoxygen
seinoxygen / comment.php
Last active December 27, 2015 08:08
Simple function to avoid junk content in comments.
<?php
/*
* Return how much compression was applied to the comment.
*/
function repetitive($comment){
if(strlen($comment) / strlen(gzcompress($comment)) > 10) {
return true;
}
return false;
}