Skip to content

Instantly share code, notes, and snippets.

View BetoFrega's full-sized avatar
🏠
Working from home

Beto Frega BetoFrega

🏠
Working from home
View GitHub Profile
@BetoFrega
BetoFrega / count clicks bitly
Created April 3, 2015 18:40
count clicks bitly
function counterBitly() {
//Creating Variables
var access_token = "xxxxxxxxxxxxxxxxxxxx ";
var url= "https://api-ssl.bitly.com/v3/link/clicks?access_token="+access_token;
var ss = SpreadsheetApp.getActiveSpreadsheet();
ss.insertSheet();
var sheet = ss.getActiveSheet();
var today = new Date();
sheet.setName(today)
@BetoFrega
BetoFrega / insta likes and comments
Created April 3, 2015 18:36
Count likes and comments posts Instagram
function puxa() {
//Creating Variables
var userID = "xxxxxxxxxx";
var access_token = "yyyyyyyyyy";
var url= "https://api.instagram.com/v1/users/"+userID+"/media/recent?access_token="+access_token;
var ss = SpreadsheetApp.getActiveSpreadsheet();
ss.insertSheet();
var sheet = ss.getActiveSheet();
var today = new Date();
@BetoFrega
BetoFrega / get-insta
Last active August 29, 2015 14:17
get instagram followers through Google App Script
function puxa() {
var userID = "yyyyyy", // altere o yyyyyy pelo user id, mantendo as aspas em volta
access_token = "xxxx.xxxx.xxxxxxxxxxxx"; // altere o xxx... pelo access_token, mantendo as aspas em volta
// NÃO ALTERE A PARTIR DAQUI
var url= "https://api.instagram.com/v1/users/"+userID+"?access_token="+access_token,
content = UrlFetchApp.fetch(url);
myData = {
@BetoFrega
BetoFrega / disable_search.php
Created November 5, 2011 03:00
Disabling Search on Wordpress
// Disabling Search
function disable_search_query($query, $error = true) {
if (is_search()) {
$query -> is_search = false;
$query -> query_vars[s] = false;
$query -> query[s] = false;
// to error
if ($error == true)
@BetoFrega
BetoFrega / replace-jquery-to-google-repo.php
Created November 5, 2011 02:56
Replace Wordpress' jQuery with Google's
//Making jQuery Google API
function modify_jquery() {
if (!is_admin()) {
wp_deregister_script('jquery');
wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js', false, '1.6.4');
wp_enqueue_script('jquery');
}
}
add_action('init', 'modify_jquery');