Skip to content

Instantly share code, notes, and snippets.

View thiagogds's full-sized avatar

Thiago Garcia da Silva thiagogds

View GitHub Profile
@thiagogds
thiagogds / macos.ahk
Created January 8, 2021 10:36
Auto hotkeys Macos to Windows
#UseHook
!VKC0::Return ; grave -> the grave ` accent gave some probs, used the virtualkey + scancode instead
!e::Return ; acute
!i::Return ; circumflex
!n::Return ; tilde
!u::Return ; umlaut
!c::Return ; cedilla
; 1 2 3 4 5 6
; r g a c t u c
# -*- coding: utf-8 *-*
import requests
client_code_url = 'https://graph.facebook.com/v2.7/oauth/client_code'
code_params = {
'access_token': {{ ACCESS_TOKEN }},
'client_id': {{ FACEBOOK_KEY }},
'client_secret': {{ FACEBOOK_SECRET }},
'redirect_uri': '',
}
twitter = Twython(
'key',
'secret',
"access_token",
"secret_token"
)
screen_name = 'some_name'
tweets = twitter.get_user_timeline(screen_name=screen_name, count=200)
next_tweets = twitter.get_user_timeline(screen_name=screen_name, count=200, max_id=tweets[-1]['id'])
@thiagogds
thiagogds / get_facebook_insights.py
Created January 21, 2016 17:01
Get facebook insights from posts. Usage: `$ python get_facebook_insights.py > output.csv`
#coding: utf-8
import requests
import csv
from urllib import parse
access_token = ''
endpoint = 'https://graph.facebook.com/v2.5/%s/insights/post_impressions_unique/'
def get_post_id(url):

#JETPACK

##Overview O Jetpack são módulos baseados no Fabric. Vale a pena dar uma olhada para entender para que serve o Fabric. A idéia por trás disso é ter uma ferramenta que nos ajuda com as seguintes funções principais:

  • Setup do Servidor, Aplicação e Banco de dados
  • Interface para gerenciamento do servidor
  • Interface para gerenciamento de configurações
  • Deploy automatizado
@thiagogds
thiagogds / gist:2961456
Created June 20, 2012 18:34
Meu Macbook air

Hardware Overview:

  • Model Name: MacBook Air
  • Model Identifier: MacBookAir3,2
  • Processor Name: Intel Core 2 Duo
  • Processor Speed: 1.86 GHz
  • Number of Processors: 1
  • Total Number of Cores: 2
  • L2 Cache: 6 MB
  • Memory: 2 GB