Skip to content

Instantly share code, notes, and snippets.

View ChangJoo-Park's full-sized avatar
:octocat:
🌱

ChangJoo Park(박창주) ChangJoo-Park

:octocat:
🌱
View GitHub Profile
// 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
// 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
// Copyright 2019 the Dart project authors. 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';
import 'dart:math' as math;
final Color primaryColor = Colors.orange;
final TargetPlatform platform = TargetPlatform.android;
@ChangJoo-Park
ChangJoo-Park / ssml.py
Last active October 29, 2019 04:50
ssml을 이용한 허생전 이상하게 읽기
import random
def prosodyfy(text):
rate = random.choice(
['default', 'x-slow', 'slow', 'medium', 'fast', 'x-fast'])
pitch = random.choice(
['default', 'x-low', 'low', 'medium', 'high', 'x-high'])
volume = random.choice(
['x-soft', 'soft', 'medium', 'loud', 'default', 'x-loud'])
@ChangJoo-Park
ChangJoo-Park / README.md
Created October 7, 2019 08:43 — forked from paumoreno/README.md
Extract all messages from a Vue.js with vue-i18n app, using gettext-extractor.

This script uses the great message extraction library gettext-extractor by lukasgeiter.

The script assumes that the location of the source files is ./src. It parses both .js and .vue files. It writes the PO template file in ./i18n/messages.pot.

Some things to note:

  • It assumes that interpolations in the templates use the delimieters {{}} (it is the most commmon case).
  • It assumes that both the template and the script sections of the .vue single file components are defined inline, and not referenced by a src attribue (it is the most common case).
  • Expressions to extract are hardcoded. Currently they are ['$t', '[this].$t', 'i18n.t'].
gh-kv -- token <GitHub Personal Access Token> \
 -- owner changjoo-park \
 -- repo my-private-store \
 -- file google-services.json \
 -- extract google-services.json
 -- branch master
@ChangJoo-Park
ChangJoo-Park / gh-kv.sh
Last active August 8, 2019 00:49
script for gh-kv
gh-kv -- token <GitHub Personal Access Token> \ 
 -- owner changjoo-park \
 -- repo my-private-store \ 
 -- file google-services.json \
 -- extract google-services.json
 -- branch master
@ChangJoo-Park
ChangJoo-Park / dart_biult_variable.json
Last active July 12, 2019 00:28
built_variable snippets for VisualStudio Code
{
"Generate builder class for new model": {
"prefix": "fltbltvar",
"body": [
"abstract class ${1:ClassName} implements Built<$1, $1Builder> {",
" $1._();",
" factory $1([void Function($1Builder) updates]) = _$$1;",
" static Serializer<$1> get serializer => _$${2:className}Serializer;",
"}"
],
@ChangJoo-Park
ChangJoo-Park / AndroidManifest.xml
Last active July 10, 2019 13:11
환경에 따른 Flutter 빌드 - vscode용
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.app.my">
<!-- The INTERNET permission is required for development. Specifically,
flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
@ChangJoo-Park
ChangJoo-Park / main.dart
Created July 9, 2019 13:04
Flutter, Counter + Provider
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
/// Counter
///
/// Counter의 현재 상태는 [_count]에 담는다.
/// [increment] 메소드로 [_count]를 증가시키고, 리스너에 변경사항을 알린다.
class Counter with ChangeNotifier {
int _count = 0;
int get count => _count;