Reference: https://gist.github.com/justinclayton/01f349f66e908a243709
Category: Frameworks
npm link with peerDependencies
Project “sub-library” – package to be linked: Project “main-project” – package to use package 1 First, run the following command in the sub-library Second, run the following command in the main-project Then, run the following command in the sub-library Now, the peer dependency moment will be available in the sub-library package. References:
Failed to transform bcprov-jdk15on-1.68.jar
Error: Reference: https://github.com/robolectric/robolectric/issues/6521#issuecomment-851736355 Solution: Open android/build.gradle Update gradle version from 4.2.2 to 7.1.3 From: classpath(“com.android.tools.build:gradle:4.2.2”) To: classpath(“com.android.tools.build:gradle:7.1.3”) Open Android Studio for the project and wait for syncing gradle Build again
React Native Boilerplate
A React Native boilerplate using React Native, React Navigation, React Redux Toolkit, React Native Bootsplash, React Native Onboarding Swiper, Redux Persist, Formik, Yup, Lottie, Axios This is a React Native boilerplate project. The project is using Node.js REST API that I developed as the boilerplate. You can find the Node.js REST API boilerplate project in here….
BUG! exception in phase ‘semantic analysis’ in source unit ‘_BuildScript_’ Unsupported class file major version 61
Issue: In Arch Linux, when try to execute npm run android, it throws the following error. Solution: Do not use Java 17 Open JDK as it’s not compatible at time of writing. Check Gradle version Check Java compatibility against Gradle version – https://docs.gradle.org/current/userguide/compatibility.html Since OpenJDK 16 does not exist in AUR – https://wiki.archlinux.org/title/java#OpenJDK, install OpenJDK…
Change Java OpenJDK version in Arch Linux
Issue: When execute npm run android for React Native, the build error occurred as below: Solution: It’s because currently Java version is lower than 11. Assuming already has another Java JDK, simply change Java for Arch Linux. Reference: https://edgardorl.com/blog/configure-java-in-arch-linux-to-run-a-react-native-application/
바이낸스 자동 매매 트레이딩 봇
추적 매수/매도 기법(Trailing buy/sell strategy)을 이용한 자동화된 바이낸스 자동매매 프로그램 소스 코드: https://github.com/chrisleekr/binance-trading-bot 최신 업데이트 정보는 README.md에 서 확인 가능합니다. 이 페이지는 한국어로 프로그램에 대한 설명만 적혀있습니다. 경고 이 프로그램을 이용하여 돈을 벌 수 있을지 없을지는 절대 보장하지 않습니다. 리스크를 감당하실 수 있을 경우에만 사용하세요! 이 코드를 이용하여 직/간접적으로 생긴 손실이나 경제적인 어려움이 생길 경우 절대 책임지지…
React.js – TypeError: Cannot read property ‘setState’ of undefined
Problem code Error Solution https://stackoverflow.com/questions/32317154/react-uncaught-typeerror-cannot-read-property-setstate-of-undefined https://reactjs.org/docs/handling-events.html With ES5 With ES6
실시간 환율 받아오기 (Get real-time currency information)
Code snippet to retrieve real-time currency from exchangeratesapi.io
Binance Auto Trading Bot – Buy low/Sell high with stop loss limit/Trade multiple coins
Automated Binance trading bot with trailing buy/sell strategy Github: https://github.com/chrisleekr/binance-trading-bot Warnings I cannot guarantee whether you can make money or not. So use it at your own risk! I have no responsibility for any loss or hardship incurred directly or indirectly by using this code. Read disclaimer before using this code. Before updating the bot, make sure…
Image Optimisation Service
Github: https://github.com/chrisleekr/image-optimisation This is a practice project. The project contains Node.js API that optimise images – jpg, png, svg, and gif. Node.js, Express, Webpack, Imagemin Demo Post local image to optimise $ curl -v -X POST -F “image=@sample1.jpg” https://image-optimisation.chrislee.kr/image -o sample1-output.jpg Pass remote image URL to optimise $ curl -v -X POST “url=https://raw.githubusercontent.com/chrisleekr/image-optimisation/master/examples/sample1.jpg” https://image-optimisation.chrislee.kr/image -o…
애자일 스프린트 회고 도구(Agile Sprint Retrospective Tool)
스프린트(Sprint)를 운영하면 2주에 한번 아니면 한달에 한번씩 정기적인 “회고(Retrospective)”를 해야한다. 모든 팀원이 솔직하게 익명으로 자신의 의견을 개진해야하고, 그 의견들을 다같이 토론하여 프로젝트 운영에 반영해야 팀의 만족도와 프로젝트 진행율이 개선된다. 이러한 회고를 통해 팀원들이 같은 실수를 하는 것을 방지할 수 도 있다. 회고를 할때 중요한 점은 어떤 의견이든지 절대 나무라거나 쓸데 없는 의견이라고 치부하지 말아야 한다….
Node.js + MongoDB RESTful API Boilerplate
Github: https://github.com/chrisleekr/nodejs-mongodb-api-boilerplate This is a sample project that I followed the tutorial Build Node.js RESTful APIs in 10 Minutes written by Olatunde Garuba. How to start $ docker-compose up -d $ docker logs -f api This command will build Node.js API and launch docker container mongo and mongo-express Endpoints Node.js API Method URL Sample Data GET http://localhost:3000/tasks POST http://localhost:3000/tasks {“name”:”Fix…
Node.js (REST API) + Vue.js/Nuxt.js (Frontend/Backend) + MySQL Boilerplate
Github: https://github.com/chrisleekr/nodejs-vuejs-mysql-boilerplate This is a boilerplate project. The project contains Node.js REST API and frontend/backend developed by Vue.js with BootstrapVue. API Node.js, Express, Webpack, Express Validator, JWT, Bunyan, Promise MySQL, Node Mailer, Jest, Supertest, Nodemon Frontend – Nuxt.js Nuxt.js, Vue.js, Vuex, Vuelidate, BootstrapVue, Jest Frontend – Vue.js Vue.js, Vuex, Vue Router, Vue Draggable, Vuelidate, BootstrapVue,…
Certbot으로 무료 SSL/TLS 인증서 발급/재발급 하기
[PHP+MySQL] 간단한 카카오 i 오픈빌더 챗봇 만들기 (Kakao i Open Builder)
카카오 i 오픈빌더 (Kakao i Open Builder)를 이용한 플러스 친구 챗봇 (PHP + MySQL) 백엔드 프로젝트 이 프로젝트는 샘플 테스트용으로 카카오톡 플러스 친구 챗봇을 구현하기 위해 만들어졌습니다. 이 프로젝트는 아주 기본 기능만을 구현하였습니다. Production 환경에서는 사용하기에 부족함이 많으니 참고용으로만 사용하시기 바랍니다. 테스트 커뮤니티 챗봇: http://pf.kakao.com/_vAKtj Backend API: https://kakao.chrislee.kr Backend 소스코드: https://github.com/chrisleekr/kakao-plusfriend-bot-backend 개발 환경 PHP 7.2…
Workerbox (Service Worker)로 사이트 로딩 속도 향상 시키기
Service Worker: 웹페이지와 별개로 브라우저가 백그라운드에서 실행시키는 자바스크립트 코드. 푸쉬, 동기화, 오프라인 모드 지원 https://developers.google.com/web/fundamentals/primers/service-workers/ Workerbox: 구글에서 제공하는 자바스크립트 라이브러리로써 웹앱의 오프라인 지원을 쉽게 할 수 있도록 해줌. https://developers.google.com/web/tools/workbox/ Workerbox 설치 법: Step 1/2: In the bottom of your website, add following Javascript code snippet: Step 2/2: Create service-workers.js and add following snippet:
Get all validation errors for Angular form
Reference 1: https://gist.github.com/JohannesHoppe/e8d07d63fc345a5fdfdf4fc4989ef2e4 import { FormGroup, ValidationErrors } from ‘@angular/forms’; export function getFormValidationErrors(form: FormGroup) { const result = []; Object.keys(form.controls).forEach(key => { const controlErrors: ValidationErrors = form.get(key).errors; if (controlErrors) { Object.keys(controlErrors).forEach(keyError => { result.push({ ‘control ‘: key, ‘error’: keyError, ‘value’: controlErrors[keyError] }); }); } }); return result; } Reference 2: public ngOnInit() { this.form.valueChanges.subscribe(data => this.onValueChanged(data));…
Yii2 errors – Failed to clone the git and “extra.asset-installer-paths” option is deprecated`
Error 1. The “extra.asset-installer-paths” option is deprecated, use the “config.fxp-asset.installer-paths” option Update composer.json by removing asset-installer-paths and add fxp-assets { … “extra”: { “yii\\composer\\Installer::postCreateProject”: { “setPermission”: [ { “runtime”: “0777”, “web/assets”: “0777”, “yii”: “0755” } ], “generateCookieValidationKey”: [ “config/web.php” ] } }, “fxp-asset”: { “installer-paths”: { “npm-asset-library”: “vendor/npm”, “bower-asset-library”: “vendor/bower” } } … } Error…
Javascript project devtools
Javascript project development tools Babel: https://babeljs.io/docs/en/ Javascript compiler – Transform syntax, Polyfill features and so on $ babel -o dist/package.js dist/package.js Standard: https://standardjs.com/ Javascript style guide, linter and formatter $ standard src/*.js Rollup: https://github.com/rollup/rollup Javascript module bundler $ rollup src/main.js –format iife –name “SamplePackage” –file dist/package.js UglifyJS: https://www.npmjs.com/package/uglify-js Javascript parser, minifier, compressor and beautifier $ uglifyjs dist/package.js -c -m…
Local workspace file (‘angular.json’) could not be found.
After upgrading Angular application using ncu -a, got an error message Local workspace file (‘angular.json’) could not be found.</code. $ ncu -a $ npm run build Local workspace file (‘angular.json’) could not be found. Error: Local workspace file (‘angular.json’) could not be found. at WorkspaceLoader._getProjectWorkspaceFilePath (/srv/project/node_modules/@angular/cli/models/workspace-loader.js:44:19) at WorkspaceLoader.loadWorkspace (/srv/project/node_modules/@angular/cli/models/workspace-loader.js:31:21) at BuildCommand._loadWorkspaceAndArchitect (/srv/project/node_modules/@angular/cli/models/architect-command.js:189:32) at BuildCommand.<anonymous> (/srv/project/node_modules/@angular/cli/models/architect-command.js:55:25)…
Setup Gitlab & Jenkins on Raspberry Pi 2
Objective: Installing and configuring Gitlab and Jenkins on Raspberry Pi 2 Background: I currently have extra Raspberry Pi and would like to use for something useful. I found Jenkins and Gitlab are able to install on Raspberry Pi. This article is to share the step by step guide how to setup Gitlab and Jenkins…
Time Clock Management System developed with Yii2 REST API + Angular 2 + Docker
Time Clock Management System (Yii2 REST API + Angular 2 + Docker) Source Repo: https://github.com/chrisleekr/time-clock-management-system-yii2-rest-api-angular2-docker This is a personal project for learning Angular 2. The project contains two applications, one for REST API backend, and the another for Angular 2 frontend. The project involves: Yii2 for providing RESTful API including user login/logout, managing global…
Missing Authroization header in request
When developing REST API in Yii2, I found some development environments do not populate Authorization header in the request; as a result, I was not able to use HttpBearerAuth because the headers were missing in the request. Note that I still can use QueryParamAuth; although, I insist on using HttpBearerAuth instead of QueryParamAuth. The…
Get AWS EC2 tags to environment parameters for apache2
Objective: AWS instances are assigned tags per instance. Need tags to be environment parameters for Apache2; thus, web application can retrieve environment parameter. Step 1: Configure tags in AWS EC2 instance Step 2: Setup IAM user and get access key id and secret access key Step 3: Access to SSH and append…