Skip to content

Instantly share code, notes, and snippets.

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

Shohei Takeda takedajs

🏠
Working from home
View GitHub Profile
$req = $twObj->OAuthRequest('https://api.twitter.com/1.1/search/tweets.json','GET',
array(
'lang' => 'ja',
'q' => '#グラドル自画撮り部',
'include_entities' => true
));
$tweets = json_decode($req);
var_dump($tweets);
・twitterで#グラドル自画撮り部のハッシュタグがついたツイートを収集
・表示する情報:文章、画像、リツイート数、フォローボタン
package main
import (
"math/rand"
"github.com/gonum/plot"
"github.com/gonum/plot/plotter"
"github.com/gonum/plot/plotutil"
"github.com/gonum/plot/vg"
)
package main
import (
"encoding/json"
"fmt"
)
type Hoge struct {
$ string
}
package main
import (
"encoding/json"
"fmt"
)
type Hoge struct {
Dollar string `json:"$"` // use a field tag for "$" key
}
package estatapi
import (
"encoding/json"
"io/ioutil"
"log"
"net/http"
"../config"
)
<?php
require 'vendor/autoload.php';
use GuzzleHttp\Client;
$client = new Client([
'base_url' => 'http://192.168.33.10',
]);
<?php
require 'vendor/autoload.php';
use GuzzleHttp\Client;
use GuzzleHttp\Event\CompleteEvent;
$client = new Client([
'base_url' => 'http://192.168.33.10',
]);
<?php
sleep(5);
echo $_GET['no'];
var self = require('sdk/self');
var tabs = require("sdk/tabs");
var {Cc, Ci} = require("chrome");
var data = self.data;
var sss = Cc[ '@mozilla.org/content/style-sheet-service;1' ].getService( Ci.nsIStyleSheetService );
var ios = Cc[ '@mozilla.org/network/io-service;1' ].getService( Ci.nsIIOService );
var uri = ios.newURI(data.url('style.css'), null, null);