Skip to content

Instantly share code, notes, and snippets.

View bungabear's full-sized avatar
👻

Minjae Son bungabear

👻
View GitHub Profile
import 'package:flutter/material.dart';
void main() {
runApp(CalcApp());
}
class CalcButton extends StatelessWidget {
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
void main() {
asyncFunction1();
asyncFunction2();
print('main completed ${DateTime.now()}');
}
Future<void> asyncFunction1() async {
await Future.delayed(const Duration(milliseconds: 1000));
print('asyncFunction1 complete ${DateTime.now()}');
@bungabear
bungabear / github-proxy-nginx.conf
Last active February 8, 2023 08:23 — forked from sirsquidness/proxy.conf
Nginx Proxy with Cache for Github
events {
worker_connections 1024;
}
# cahce all through github.com
http {
# cache option inactive delete after 30days, total cache size 2G, cache index 1M (8,000)
proxy_cache_path /var/cache/nginx/cache levels=1:2 keys_zone=cache_zone:1m inactive=30d max_size=2048m;
proxy_temp_path /var/cache/nginx/temp/;
@bungabear
bungabear / docker-login.sh
Last active November 11, 2021 05:53
docker util script
echo pw | docker login ghcr.io -u username --password-stdin
<?xml version="1.0" encoding="UTF-8"?> <!-- 60초마다 설정 파일의 변경을 확인 하여 변경시 갱신 -->
<configuration scan="true" scanPeriod="60 seconds"> <!--springProfile 태그를 사용하면 logback 설정파일에서 복수개의 프로파일을 설정할 수 있다.-->
<!-- docker : /workspace/logs-->
<property name="LOG_PATH" value="./logs" />
<property name="LOG_FILE" value="log" />
<property name="LOG_LEVEL" value="info"/>
<property name="ERR_LOG_FILE_NAME" value="err_log"/>
@bungabear
bungabear / build.groovy
Created April 14, 2021 05:22 — forked from paramsen/build.groovy
Generate Android version code from git count in Gradle (build.gradle)
// Generate a minor version code from git commit count (for prod builds)
static def generateVersionCode() {
def result = "git rev-list HEAD --count".execute().text.trim() //unix
if(result.empty) result = "PowerShell -Command git rev-list HEAD --count".execute().text.trim() //windows
if(result.empty) throw new RuntimeException("Could not generate versioncode on this platform? Cmd output: ${result.text}")
return result.toInteger()
}
def majorVersion = 1
@ECHO OFF
::Only grabs the serial of the device connected over USB
FOR /F "skip=1" %%x IN ('adb devices') DO (
START scrcpy-noconsole -s %%x
)
function scroll_to(current, to){
$(document).ready(function(){
var currentOffset = $('#{current}').offset();
var toOffset = $('#{to}').offset();
$('html, body').animate({ toOffset.top : currentOffset.top}, 200);
});
}
@bungabear
bungabear / Android Studio .gitignore
Created September 3, 2017 16:00 — forked from iainconnor/Android Studio .gitignore
A .gitignore for use in Android Studio
# Built application files
/*/build/
# Crashlytics configuations
com_crashlytics_export_strings.xml
# Local configuration file (sdk path, etc)
local.properties
# Gradle generated files