Skip to content

Instantly share code, notes, and snippets.

View Luke-SNAW's full-sized avatar

Luke SNAW Luke-SNAW

View GitHub Profile
@Luke-SNAW
Luke-SNAW / confix.xml
Created September 21, 2020 01:24
[SplashMaintainAspectRatio android] #cordova
<preference name="SplashMaintainAspectRatio" value="true|false" />
@Luke-SNAW
Luke-SNAW / .eslintignore
Last active March 23, 2021 23:09
[🌠 eslint prettier setting for next.js]
node_modules
@Luke-SNAW
Luke-SNAW / download.js
Created March 23, 2021 23:11
[How trigger file downloads with JavaScript]
function downloadFile(file) {
// Create a link and set the URL using `createObjectURL`
const link = document.createElement("a");
link.style.display = "none";
link.href = URL.createObjectURL(file);
link.download = file.name;
// It needs to be added to the DOM so it can be clicked
document.body.appendChild(link);
link.click();
@Luke-SNAW
Luke-SNAW / readme.md
Created April 28, 2021 01:57
[⭐️ referrer from wkwebview on google map API] #cordova #google

API 및 서비스> 사용자 인증 정보> API 키

HTTP 리퍼러(웹사이트)로 제한둘 때,

<preference name="scheme" value="app" />
<preference name="hostname" value="hostname" />

로 설정한 app://hostname이 안먹힘.

googling하다가 *://localhost/*로 성공. 앞의 protocol은 file, http 등을 시도해 봤는데 모두 실패

@Luke-SNAW
Luke-SNAW / git.sh
Created June 2, 2021 02:13
[git diff commits, patch] #git
git diff k73ud dj374 > my.patch
git apply my.patch
@Luke-SNAW
Luke-SNAW / vue.js-tools.md
Last active July 11, 2021 08:37
[Vue.js] #articles #vue
  • vue-clickaway: Sometimes you need to detect clicks outside of the element (to close a modal window or hide a dropdown select).
@Luke-SNAW
Luke-SNAW / test-on-pull-request.yml
Last active September 10, 2021 04:12
[github actions: test build on pull request] #github
name: Test on pull request
on:
workflow_dispatch:
pull_request:
branches: [dev]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
@Luke-SNAW
Luke-SNAW / etc.md
Last active October 5, 2021 23:23
[Etc] #articles
  • Hacking your resume to get it in front of an actual human
  • Firebase Almost Ruined My Startup
    • Because they had to read or write data directly from the database, we had to waste a lot of time on that. As we decided to build three different platforms (Android, iOS, and web), it was very impractical to allow developers to write data directly in the database.
    • If any developer from any platform pushed the wrong formatted data, then the other platforms crashed. The productivity of the whole tech team became slow.
  • My Logging Best Practices
    • Log after, not before
    • Separate parameters and messages: difficult to parse for example for Grok patterns.
    • Distinguish between WARNING and ERROR
  • INFO is for business, DEBUG for technology