Skip to content

Instantly share code, notes, and snippets.

View hongsw's full-sized avatar
🕹️
Focusing

Seungwoo hong hongsw

🕹️
Focusing
View GitHub Profile
@hongsw
hongsw / main.dart
Last active October 17, 2022 05:20
나의 첫번째 플러터앱
import 'package:flutter/material.dart';
void main() {
runApp(
const MaterialApp(
home: Scaffold(
body: Text("안녕! 나의 첫번째 플러터 앱")
)
)
);
@hongsw
hongsw / main.dart
Last active October 11, 2022 04:56
레이아웃 위젯을 사용해보자
import 'package:flutter/material.dart';
void main() {
runApp(
MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text("내폰내툰"),
),
body:
@hongsw
hongsw / main.dart
Created September 7, 2022 02:47
Counter example
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
@hongsw
hongsw / main.dart
Last active September 4, 2022 06:11
primal-gust-2068
void main() {
FizzBuzz f = FizzBuzz();
for (int i = 0; i < 5; i++) {
print(f.myTurn());
}
for (int i = 0; i < 5; i++) {
print(f.myTurn());
}
}
@hongsw
hongsw / fizzBuzz.dart
Last active September 14, 2022 02:56
Fizz Buzz in dart
fizzBuzz(turn) {
var str = '';
if (turn % 3 == 0 && turn % 5 == 0){
str += 'FizzBuzz';
} else if (turn % 3 == 0) {
str += 'Fizz';
} else if (turn % 5 == 0) {
str += 'Buzz';
} if (str.isEmpty){
str = turn.toString();
@hongsw
hongsw / flutter_ktoon_tutorial_1.dart
Last active August 26, 2022 04:40
Flutter K-Toon Tutorial 1
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
@hongsw
hongsw / flutter_k_webtoon_grid.dart
Last active October 26, 2022 01:11
Flutter K-Web Toon Demo
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart' show debugPaintSizeEnabled;
void main() {
debugPaintSizeEnabled = false; // Set to true for visual layout
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
# install minikube 1.26.0
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
sudo install minikube-linux-amd64 /usr/local/bin/minikube
# upgrade yum and install git
sudo yum upgrade
sudo yum install git
# install golang for cri-dockered
wget https://storage.googleapis.com/golang/getgo/installer_linux
@hongsw
hongsw / init.sh
Last active May 24, 2022 08:19
Add a new authorized key to an AWS EC2 instance by a new .pem file
chmod 400 new.pem
ssh-keygen -y -f new.pem > new.pub
cat ./new.pub | ssh -i old.pem USER@HOST "cat >> ~/.ssh/authorized_keys"
# Test
ssh -i new.pem USER@HOST