Skip to content

Instantly share code, notes, and snippets.

View ValentinH's full-sized avatar

Valentin Hervieu ValentinH

View GitHub Profile
@ValentinH
ValentinH / Stylefile.yml
Created August 3, 2018 17:57
Customizations for www.ricardo.ch via StyleURL.
---
version: 1.0
domains:
- www.ricardo.ch
url_patterns:
- www.ricardo.ch/*
timestamp: '2018-08-03T17:57:07Z'
id: k5bL
redirect_url: https://www.ricardo.ch/fr/a/schoene-ohrstecker-1001262266/
shared_via: StyleURL - (https://www.styleurl.app) import and export CSS changes from
@ValentinH
ValentinH / queryTwitter.php
Created January 5, 2014 10:35
How to query Twitter search API in PHP. This example shows how to query a hashtag and get the top 100 more recent results. * require CURL.
function queryTwitter($search)
{
$url = "https://api.twitter.com/1.1/search/tweets.json";
if($search != "")
$search = "#".$search;
$query = array( 'count' => 100, 'q' => urlencode($search), "result_type" => "recent");
$oauth_access_token = "ABCD";
$oauth_access_token_secret = "1234";
$consumer_key = "abcd";
$consumer_secret = "5678";