This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env ruby | |
require 'thor' | |
require 'octokit' | |
require 'io/console' | |
class Matomarukun < Thor | |
desc "matomeru usage", "matomeru desc" | |
def matomeru user_id | |
print "please github password" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DataStore | |
attr_accessor :hoge | |
attr_accessor :fuga | |
def initialize *params | |
params = params.first | |
unless params.empty? | |
params.each do |k, v| | |
if self.respond_to?(v) && self.respond_to?("#{v}=") | |
self.instance_variable_set("@#{k}".to_sym, v) | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'net/http' | |
page_id = "your page id" | |
access_token = "your access token" | |
html_source = "your html content" | |
uri = URI.parse("https://graph.facebook.com/v2.6/#{page_id}/instant_articles") | |
request = Net::HTTP::Post.new(uri.path) | |
request.set_form_data({ | |
access_token: access_token, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"github.com/google/gopacket" | |
"github.com/google/gopacket/layers" | |
"github.com/google/gopacket/pcap" | |
"log" | |
"net" | |
"time" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo yum -y install bind |