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
| #!/bin/bash | |
| if [ $# -ne 2 ]; then | |
| echo "引数にチーム名と点数を入力してください。" 1>&2 | |
| echo "e.g. sh post.sh xxxx 10000" | |
| exit 1 | |
| fi | |
| FIREBASE=ishocon2-geeoki-201809 | |
| TEAM=$1 |
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
| yum -y update | |
| yum -y install \ | |
| git \ | |
| gcc \ | |
| wget \ | |
| curl \ | |
| rake \ | |
| bison \ | |
| openssl-devel \ | |
| make |
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
| version: '3' | |
| services: | |
| nginx: | |
| image: nginx | |
| ports: | |
| - 80:80 | |
| mitmweb: | |
| image: mitmproxy/mitmproxy | |
| tty: true | |
| ports: |
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 'sinatra' | |
| require 'sinatra/reloader' if development? | |
| class User | |
| attr_accessor :first_name, :last_name, :age | |
| def initialize(last_name, first_name, age) | |
| self.last_name = last_name | |
| self.first_name = first_name | |
| self.age = age |
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 'nokogiri' | |
| require 'httparty' | |
| url = 'https://www.ryukyu-frogs.com/information/' | |
| res = HTTParty.get(url) | |
| doc = Nokogiri::HTML.parse(res.body) | |
| doc.css('.news-list li').each do |node| | |
| puts node.css('.content .title').text | |
| 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
| class User | |
| attr_accessor :first_name, :last_name, :age | |
| // コンストラクタ Constructor | |
| def initialize(last_name, first_name, age) | |
| self.last_name = last_name | |
| self.first_name = first_name | |
| self.age = age | |
| 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
| FROM ruby:2.5.1 | |
| ENV LANG C.UTF-8 | |
| RUN apt-get update -qq && \ | |
| apt-get install -y --no-install-recommends \ | |
| build-essential \ | |
| libpq-dev \ | |
| libfontconfig1 \ | |
| less \ |
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 'sinatra' | |
| require 'mysql2' | |
| require 'mysql2-cs-bind' | |
| def db | |
| # Mysqlドライバの設定 | |
| @db ||= Mysql2::Client.new( | |
| host: 'localhost', | |
| port: 3306, | |
| username: 'root', |
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 'sinatra' | |
| require 'sinatra/reloader' | |
| require 'mysql2' | |
| require 'mysql2-cs-bind' | |
| # Mysqlドライバの設定 | |
| db = Mysql2::Client.new( | |
| host: 'localhost', | |
| port: 3306, | |
| username: 'root', |
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 'mysql2' | |
| require 'mysql2-cs-bind' | |
| # Mysqlドライバの設定 | |
| db = Mysql2::Client.new( | |
| host: 'localhost', | |
| port: 3306, | |
| username: 'root', | |
| password: '', | |
| database: 'sample', |