Skip to content

Instantly share code, notes, and snippets.

View takuya-nakayasu's full-sized avatar

TAKUYA NAKAYASU takuya-nakayasu

View GitHub Profile
@takuya-nakayasu
takuya-nakayasu / spinner.component.ts
Created September 22, 2019 08:10
スピナーのコンポーネントクラス
import { Component } from '@angular/core';
import { Subject } from 'rxjs';
import { SpinnerService } from '../../services/spinner.service';
@Component({
selector: 'app-spinner',
templateUrl: './spinner.component.html',
styleUrls: ['./spinner.component.scss']
})
export class SpinnerComponent {
@takuya-nakayasu
takuya-nakayasu / download_rakuten-card.py
Created September 15, 2019 08:25
楽天カードの利用明細をダウンロードするコード
import time
import os
import requests
from selenium import webdriver
import chromedriver_binary
from rakuten_credentials import *
# ユーザIDとパスワードを別ファイルから取得する
user_id = ID
password = PASS
@takuya-nakayasu
takuya-nakayasu / app.component.ts
Created September 7, 2019 09:26
Custom URL Schemeのルーティング設定
// ...省略
import { Deeplinks } from '@ionic-native/deeplinks';
@Component({
templateUrl: 'app.component.html'
})
export class AppComponent {
constructor(platform: Platform,
// ...省略
private deeplinks: Deeplinks,
@takuya-nakayasu
takuya-nakayasu / share-button.compoent.html
Created April 21, 2019 14:44
share-buttonコンポーネントのテンプレートファイル
<div class="wrapper">
<div class="f-share">
<!-- facebookシェアボタン -->
<div class="fb-share-button" data-href="https://l08084.github.io/morse-code-translate-website/"
data-layout="button_count" data-size="small"><a target="_blank"
href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fl08084.github.io%2Fmorse-code-translate-website%2F&amp;src=sdkpreparse"
class="fb-xfbml-parse-ignore">シェア</a></div>
</div>
<div class="share">
<!-- はてなブックマークシェアボタン -->
@takuya-nakayasu
takuya-nakayasu / input.component.ts
Created April 21, 2019 10:34
input コンポーネントクラス
import { Component, OnInit, Output, EventEmitter, Input } from '@angular/core';
import { FormBuilder, FormGroup, FormControl } from '@angular/forms';
import { debounceTime } from 'rxjs/operators';
import { ConvertService } from 'src/app/service/convert.service';
@Component({
selector: 'app-input',
templateUrl: './input.component.html',
styleUrls: ['./input.component.scss']
})
@takuya-nakayasu
takuya-nakayasu / app.component.html
Created April 21, 2019 10:28
ルートコンポーネントのテンプレートファイル
<!-- headerコンポーネント -->
<app-header></app-header>
<div class="wrapper">
<!-- select コンポーネント -->
<app-select (sendConvertType)="onSendConvertType($event)"></app-select>
<!-- input コンポーネント -->
<app-input [convertType]="setConvertType" (inputText)="onInput($event)"></app-input>
<!-- output コンポーネント -->
<app-output [convertType]="setConvertType" [text]="setText"></app-output>
<!-- share-button コンポーネント -->
@takuya-nakayasu
takuya-nakayasu / app.component.html
Created March 21, 2019 08:28
ルートコンポーネントのテンプレートファイル
<app-my-counter></app-my-counter>
@takuya-nakayasu
takuya-nakayasu / my-counter.component.ts
Created March 21, 2019 08:27
カウンターコンポーネントのコンポーネントクラス
import { Component } from '@angular/core';
import { Observable } from 'rxjs';
import { Store, select } from '@ngrx/store';
import { Increment, Decrement, Reset } from '../action/counter.actions';
@Component({
selector: 'app-my-counter',
templateUrl: './my-counter.component.html'
})
export class MyCounterComponent {
@takuya-nakayasu
takuya-nakayasu / my-counter.component.html
Created March 21, 2019 08:26
カウンターコンポーネントのテンプレートファイル
<button (click)="increment()">Increment</button>
<div>Current Count: {{ count$ | async }}</div>
<button (click)="decrement()">Decrement</button>
<button (click)="reset()">Reset Counter</button>
@takuya-nakayasu
takuya-nakayasu / app.module.ts
Created March 21, 2019 08:25
モジュールファイル
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
import { StoreModule } from '@ngrx/store';
import { StoreDevtoolsModule } from '@ngrx/store-devtools';
import { counterReducer } from './components/my-counter/reducer/counter.reducer';
import { MyCounterComponent } from './components/my-counter/view/my-counter.component';
@NgModule({