Skip to content

Instantly share code, notes, and snippets.

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

Slowhand Slowhand0309

🏠
Working from home
View GitHub Profile
@Slowhand0309
Slowhand0309 / README.md
Last active November 7, 2020 19:49
Alfred Workflow: VSCode Remote Containers
@Slowhand0309
Slowhand0309 / handling_back_button.dart
Created October 13, 2020 08:31
[Handling Back Button in Flutter] #Flutter
class MyApp extends StatelessWidget {
Future<bool> _onBackPressed() {
// true -> go back
// false -> back cancel
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
@Slowhand0309
Slowhand0309 / README.md
Last active October 18, 2020 07:47
[Alfred Android emulator] list > run #Alfred
@Slowhand0309
Slowhand0309 / Android_Integration.txt
Last active October 7, 2020 05:01
[Flutter firebase_messaging note] #Flutter
// root build.gradle
dependencies {
// Add the google services classpath
classpath 'com.google.gms:google-services:4.3.2'
}
// app/build.gradle
// ADD THIS AT THE BOTTOM
apply plugin: 'com.google.gms.google-services'
@Slowhand0309
Slowhand0309 / README.md
Last active September 28, 2020 04:26
[Alfred workflow - numbering test account] show numbering test account via input number #Alfred

Alfred

  1. Create new「Script Filter」
  2. Edit Script Filter
  3. Connect 「Copy to Clipboard」

image

@Slowhand0309
Slowhand0309 / doc.md
Last active September 28, 2020 02:04
[Riverpod FutureProvider] sample, links #Flutter
@Slowhand0309
Slowhand0309 / branch.sh
Created May 14, 2020 03:07
[シェル内でgit branch存在チェック] #Script
if [ `git branch --list $branch_name` ]; then
echo "Branch name $branch_name already exists."
else
echo "Branch named $branch_name does not exist"
fi
@Slowhand0309
Slowhand0309 / ItemTableViewCell.swift
Last active October 10, 2020 16:58
UICollectionView in UITableView
import UIKit
class ItemTableViewCell: UITableViewCell {
@IBOutlet weak var collectionView: UICollectionView! {
didSet {
let nib = UINib(nibName: "ItemCollectionViewCell", bundle: nil)
collectionView.register(nib, forCellWithReuseIdentifier: "ItemCollectionViewCell")
}
}
@Slowhand0309
Slowhand0309 / MainActivity.kt
Created September 24, 2019 15:46
[Backボタン制御] #Android
// legacy
public boolean onKeyDown(int keyCode, KeyEvent event) {
  if (keyCode == KeyEvent.KEYCODE_BACK){
    // do something...
  } else {
    return super.onKeyDown(keyCode, event);
  }
}
@Slowhand0309
Slowhand0309 / APIRequest.swift
Last active October 10, 2020 16:56
[APIKitのBasic認証] #iOS
import APIKit
import Foundation
protocol APIRequest: Request {}
// https://github.com/ishkawa/APIKit/issues/121
// https://stackoverflow.com/questions/47983026/error-copying-matching-creds-swift-rest-api-call
extension APIRequest {
var baseURL: URL {
return URL(string: "https://api.xxx.com")!