Skip to content

Instantly share code, notes, and snippets.

View lmfrossard's full-sized avatar
🎯
Focusing

L. Frossard lmfrossard

🎯
Focusing
  • Rio de Janeiro - Brazil
View GitHub Profile
@animista01
animista01 / like.js
Last active November 8, 2017 18:26
Dar Like en Facebook a todas las publicaciones que estén en pantalla
// 1. Ir a la pagina a la que se le quiere dar 'likes' a sus publicaciones
//Con el siguiente codigo se llega al final de la pagina automaticamente. Repetir hasta que sea necesario (Recomendable que haya cargado < de 50 publicaciones)
// 2. Pegar lo siguiente hasta que consideres necesario.
window.scrollTo(0, document.body.scrollHeight);
setTimeout(function(){
window.scrollTo(0, document.body.scrollHeight);
}, 2000);
@aniruddha-adhikary
aniruddha-adhikary / fb_image_downloader.py
Created April 5, 2015 06:41
Download all images from Facebook Profiles / Pages
#!/usr/bin/env python
import urllib2
import json
import os
from datetime import datetime
import re
params = {
@xlbruce
xlbruce / Recursão
Created March 27, 2015 20:33
Algoritmos recursivos simples
/**
* Máximo Divisor Comum recursivo
* @param a
* @param b
* @return O MDC de a e b
*/
public static int mdc(int a, int b) {
if (b == 0) {
return a;
}
@enkeboll
enkeboll / facebook_post_scorer.py
Last active November 8, 2017 18:36
COMS 6998 Social Networks Facebook Post Scorer
__author__ = 'andyenkeboll'
import requests
# on mac, `sudo pip install facebook-sdk`
# https://pypi.python.org/pypi/facebook-sdk
import facebook
from collections import Counter
# `sudo pip install mechanize`
import mechanize
import re
@BrianRosamilia
BrianRosamilia / gist:a7dd905a5dd2517f9c8e
Created September 5, 2014 02:42
Removing Facebook Posts
Array.prototype.slice.call(document.getElementsByClassName('userContentWrapper')).forEach(function(itm) {
if (itm.innerHTML.search(/nfl|football/i) != -1) {
itm.parentNode.removeChild(itm)
}
})
@jboulhous
jboulhous / serach-facebook-pages.js
Created August 5, 2013 03:39
Seach for facebook pages
function getUrl(query,type,callback){
var access = Meteor.user().services.facebook.accessToken
var url = 'https://graph.facebook.com/search?'
url += $.param({
q:query,
type : type,
access_token : access
});
return $.get(url,callback);
}
@marioplumbarius
marioplumbarius / quick-sort.js
Created May 18, 2013 19:52
Lista de algoritmos úteis em javascript: quicksort,...
function partition( array, left, right ) {
var pivot = array[Math.floor((left + right)/2)],
i = left,
j = right;
while ( i <= j ) {
while ( array[i] < pivot ) {
i++;
@tcelestino
tcelestino / facebook_comment.js
Last active November 8, 2017 18:27
Salvando comentário do Facebook em um post no sistema de comentários do WordPress.
// esse script terá que ficar no header.php
window.fbAsyncInit = 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
});
@fmasanori
fmasanori / Facebook Search Python 3x.py
Last active November 8, 2017 18:33
Python 3.x Facebook Search
#@@@@@Sorry: this code has been deprecated in 2015, April 30 with new Facebook 2.0 API version
import urllib.request
import json
def search(texto):
#pegue o access_token
#em https://developers.facebook.com/tools/explorer
url = 'https://graph.facebook.com/search?q='
tail = '&type=post&access_token=<copie aqui o access_token>'
resp = urllib.request.urlopen(url+texto+tail).read()
@abelsonlive
abelsonlive / entarteur.py
Created December 5, 2012 05:35
use facepy for facebook feed dumps
from facepy import GraphAPI
import facepy
import re
import json
#meta variables
access_token = 'your_token'
page_id = 'the_page' # input page id here
base_query = page_id + '/feed?limit=300'