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 31, 2022 09:05
3.3-변수이용하여 화면구성 toons.map
import 'package:flutter/material.dart';
void main() {
final toons = [
{
"title": "이상한 변호사 우영우",
"image": "https://my-k-toon.web.app/webtoon/1.png"
},
{
"title": "외모지상주의",
@hongsw
hongsw / main.dart
Last active October 27, 2022 09:38
Flutter K-Web Toon Mini with Gist JSON 
import 'dart:core';
import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
void main(){
runApp(MainFullDemo());
}
class MainFullDemo extends StatelessWidget {
@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 / 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_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);
@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
@ks2211
ks2211 / Phoenix esbuild with Tailwind and Fontawesome
Last active July 30, 2024 01:50
Phoenix with esbuild, fortawesome, and tailwindcss
Phoenix esbuild with Tailwind+Fontawesome
@nicbet
nicbet / Dockerfile
Created June 27, 2019 03:00
Elixir 1.9 Releases Alpine Linux Docker Multi-Stage Build
# ---- Build Stage ----
FROM erlang:22-alpine AS app_builder
# Set environment variables for building the application
ENV MIX_ENV=prod \
TEST=1 \
LANG=C.UTF-8
# Fetch the latest version of Elixir (once the 1.9 docker image is available you won't have to do this)
RUN set -xe \
import 'package:flutter/material.dart';
class HomePage extends StatefulWidget {
@override
_HomePageState createState() => _HomePageState();
}
class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
TabController _tabController;
final GlobalKey<State> _item0Key = new GlobalKey<State>(debugLabel: 'item0Key');
@jpbecotte
jpbecotte / Vue-cli-3-Phoenix-1.3-HOWTO.md
Last active March 28, 2025 04:04
Vue-cli 3, Phoenix 1.3, a complete how-to

Introduction

I have been struggling to start a new project with Phoenix 1.3 and the new vue-cli 3 for Vue.js. There are tons of example already but none of them suited my needs, because:

  • I want to use the new Vue-cli to select the features that I want,
  • I do NOT want to setup Webpack (I know, what a shame!). The new Vue-cli includes the new vue-cli-service, which uses an instance of webpack-dev-server, so you don't have to import it manually in your project.
  • I do not want to use Brunch.

Create your Phoenix App

Assuming that you have Elixir and Phoenix 1.3 are both installed, let's build our new App.