CLIからSoundCloudを起動するgemのやつ。 ホントは動作を確認してからいろいろやらないといけないんだろうけど、なんかissuesで結構動かすまで大変そうだから単純にコードを追いかけるだけ。
参考にしたいのは
- メソッドの切り分けの単位 →自分が単純にザラザラ書いてしまうので、参考にしたい
// Using https://primer.style/css | |
- flash.each do |key, value| | |
.flash-messages{data: { controller: 'flash'}} | |
.flash{class: "flash-#{key == 'alert' ? 'error' : key}"} | |
%button.flash-close{data: { action: 'flash#dismiss', target: 'flash.close'}, type: 'button'} | |
× | |
= value |
import puppeteer from 'puppeteer' | |
const Readability = require("readability"); | |
import { JSDOM } from 'jsdom' | |
const URL = 'url' | |
(async () => { | |
const browser = await puppeteer.launch({ | |
args: [ | |
'--no-sandbox', |
import Yucho from './yucho'; | |
const yuchoID = process.env.YUCHO_ID | |
const password = process.env.YUCHO_PASSWORD | |
const aikotoba = process.env.YUCHO_AIKOTOBA | |
(async () => { | |
const yucho = await new Yucho(yuchoID, password, aikotoba) | |
await yucho.run() |
require 'test/unit' | |
class Sample | |
def self.convert(str) | |
1 if str == '一' | |
end | |
end | |
class TestSample < Test::Unit::TestCase | |
def test_one |
### | |
# Post coverage rate to Slack | |
# | |
# Usage: bash circleci-coverage-slack.sh [simplecov|cobertura|jacoco] | |
# | |
# Required environment variables: | |
# | |
# - CIRCLE_TOKEN: project-specific readonly API token (need to access build artifacts for others) | |
# - SLACK_ENDPOINT: Slack endpoint url | |
# - COVERAGE_FILE: coverage filename (default: .last_run.json) |
# cf: https://hub.docker.com/r/heroku/ruby/~/dockerfile/ | |
FROM heroku/cedar:14 | |
RUN mkdir -p /app/user | |
WORKDIR /app/user | |
ENV GEM_PATH /app/heroku/ruby/bundle/ruby/2.2.0 | |
ENV GEM_HOME /app/heroku/ruby/bundle/ruby/2.2.0 | |
RUN mkdir -p /app/heroku/ruby/bundle/ruby/2.2.0 |
<!DOCTYPE html> | |
<html lang='ja'> | |
<head> | |
<meta charset='UTF-8'> | |
<title>カレーのレシピ</title> | |
</head> | |
<body> | |
<header> | |
<h1>カレーのレシピ</h1> | |
<p>誰でもできる、美味しいカレーの作り方です。旦那も息子もこのカレーが大好物。</p> |
#!/bin/bash | |
# get current branch name | |
branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,') | |
push_heroku_branch() | |
{ | |
git push -f heroku deploy-to-heroku:master | |
} |
CLIからSoundCloudを起動するgemのやつ。 ホントは動作を確認してからいろいろやらないといけないんだろうけど、なんかissuesで結構動かすまで大変そうだから単純にコードを追いかけるだけ。
参考にしたいのは
#!/usr/bin/env ruby | |
#-*- coding: utf-8 -*- | |
require 'mechanize' | |
#お笑いナタリーの芸人プロフィールのページから、芸人の情報を抜き出すスクリプト | |
#期待するdataの中身 | |
=begin | |
data = |