Apple's headquaters; Apple Park; Infinite Loop in Cupertino and Apple Shop
Wednesday, June 18, 2025
Google - Noogler's hat, Googleplex, Vision Board
Saturday, June 7, 2025
Singapore Nights from My Window – Free Wallpaper Moments
For three years, I used this view as my daily Windows wallpaper — a visual reminder of my dream. Eventually, I moved here. It was my vision board all along.
Sunday, April 6, 2025
The Screenshot That Sparked a Dream: My Google Interview Journey
Here's a screenshot of the ever-exciting Google referral page.
I’m incredibly grateful to a friend from my university’s Computer Science department who kindly referred me. Thanks to that, I had the amazing opportunity to go through four onsite interviews with Google.
In the end, I accepted an offer from another company and moved to a different country instead of the U.S., but the entire journey was an unforgettable and genuinely enjoyable experience as a software engineer.
Monday, March 31, 2025
LA Santa Monica Beach
This photo is of Santa Monica Beach in LA. It was also the background of the beach in GTA5.
LA is in Southern California. I had an interview at Apple's Longbeach office a few years ago. I was curious about this photo and looked it up.
I didn't get in, but I want to go on a trip someday and visit Santa Monica Beach, which was the background of GTA5.
Saturday, March 29, 2025
Epic Games Headquarter in Cary, NC and Fortnite
This is the headquarters building of Epic Games located in Cary, NC.
I've been enjoying Epic's games since Jazz Jack Rabbit.
Recently, I went through the final interview as a Senior Mobile Platform Engineer but unfortunately didn't make it in the end.
However, it was truly a great experience and I could tell that the company is at the top tier technologically.
Unreal Engine is a multi-platform solution that can be used not only for mobile and PC but also for vehicle QNX systems, and the interview questions went deep into Linux knowledge.
The interview was more challenging than any I've experienced with FAANG big tech companies.
Friday, March 28, 2025
Golden Gate Bridge Photo
A scene from the Silicon Valley drama
One day, I will get a job as a software engineer in Silicon Valley, move here with my family, and take a picture here.
Monday, April 15, 2024
Android add custom bitmap to Fresco image library cache
// add cache to memory
val cacheKey = SimpleCacheKey(key)
val imagePipeline = Fresco.getImagePipeline()
val closeableBitmap = CloseableStaticBitmap(
bitmap,
{
it.recycle()
},
ImmutableQualityInfo.FULL_QUALITY,
0, 0
)
imagePipeline.bitmapMemoryCache.cache(cacheKey, CloseableReference.of(closeableBitmap))
// add cache to disk
val stream = ByteArrayOutputStream()
bitmap.compress(Bitmap.CompressFormat.JPEG, 100, stream)
val byteArray = stream.toByteArray()
Fresco.getImagePipelineFactory().mainFileCache.insert(cacheKey) { outputStream ->
outputStream.write(byteArray)
}
}
Tuesday, December 3, 2019
Node.js sequelize MySQL JSON function 사용하기
const actionLogs: ActionLog[] = await ActionLog.findAll({
where: Sequelize.where(
Sequelize.fn('JSON_EXTRACT',
Sequelize.col('action'),
'$.name'),
'reward')
})
Tuesday, October 8, 2019
MariaDB /usr/local/etc/my.cnf.d No such file or directory
Monday, September 16, 2019
MySQL timezone convert function CONVERT_TZ
Wednesday, September 4, 2019
MariaDB Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
mysql.server start
Starting MariaDB
.190904 09:57:41 mysqld_safe Logging to '/usr/local/var/mysql/duongame-MacBook-Pro.local.err'.
190904 09:57:42 mysqld_safe Starting mysqld daemon with databases from /usr/local/var/mysql
SUCCESS!
Tuesday, September 3, 2019
BitcoinSV Node.js bitsocket example
Node.js로 작성했으며, 다음과 같은 패키지를 npm으로 설치해야 한다.
>npm i -S btoa
>npm i -S eventsource
var btoa = require('btoa')
var EventSource = require('eventsource')
// Write a bitquery
var query = {
"v": 3, "q": { "find": {} }
}
// Encode it in base64 format
var b64 = btoa(JSON.stringify(query))
// Subscribe
var bitsocket = new EventSource('https://genesis.bitdb.network/s/1FnauZ9aUH2Bex6JzdcV4eNX7oLSSEbxtN/'+b64)
// Event handler
bitsocket.onmessage = function(e) {
console.log(e.data)
}
//호출결과는 다음과 같으며 실시간으로 계속 메세지가 추가된다.
{"type":"open","data":[]}
{
"type": "u",
"data": [{
"tx": {
"h": "0c07b01307b14e3935bcdbaf50770c0e4a4e23aeb9c09c49550e09a5ad570652"
},
"in": [{
"i": 0,
"b0": "MEUCIQD6VwsndQUrrpmFCJPlxuAF1fUmZcPAx5UgC803Som2cQIgZuwlNDM3Puu/3wqqzTd5cFbUO8fEX4Q5Y9jCBdKMoDtB",
"b1": "A8ydsZIv8Hew5jLQLoKpxqunqCx2xT18H1aKd3XIlURe",
"str": "3045022100fa570b2775052bae99850893e5c6e005d5f52665c3c0c795200bcd374a89b671022066ec253433373eebbfdf0aaacd37797056d43bc7c45f843963d8c205d28ca03b41 03cc9db1922ff077b0e632d02e82a9c6aba7a82c76c53d7c1f568a7775c895445e",
"e": {
"h": "07225863412d4d037cb5514ccf94a29583691367218f28eced772c0ef1e9a866",
"i": 1,
"a": "1EomR6yvfRUCUeR9RdiLE8AUkveW6wA2uz"
},
"h0": "3045022100fa570b2775052bae99850893e5c6e005d5f52665c3c0c795200bcd374a89b671022066ec253433373eebbfdf0aaacd37797056d43bc7c45f843963d8c205d28ca03b41",
"h1": "03cc9db1922ff077b0e632d02e82a9c6aba7a82c76c53d7c1f568a7775c895445e"
}],
"out": [{
"i": 0,
"b0": {
"op": 118
},
"b1": {
"op": 169
},
"b2": "4QBR3rSIWSQI33JyQGzqWd/mEcY=",
"s2": "�\u0000Q�Y$\b�rr@l�Y��\u0011�",
"b3": {
"op": 136
},
"b4": {
"op": 172
},
"e": {
"v": 1000,
"i": 0,
"a": "1MWhRPAtAdXFSTgZrkrRuDy5xsofz63nHD"
},
"h2": "e10051deb488592408df7272406cea59dfe611c6"
}, {
"i": 1,
"b0": {
"op": 118
},
"b1": {
"op": 169
},
"b2": "l3HYfq/xcSUVBLXAClhqHDwqGj4=",
"s2": "�q�~��q%\u0015\u0004��\nXj\u001c<*\u001a>",
"b3": {
"op": 136
},
"b4": {
"op": 172
},
"e": {
"v": 6695136,
"i": 1,
"a": "1EomR6yvfRUCUeR9RdiLE8AUkveW6wA2uz"
},
"h2": "9771d87eaff171251504b5c00a586a1c3c2a1a3e"
}],
"_id": "5cbe972233dedb166dc469c8"
}]
}
Node.js SSE example
//서버
const express = require('express')
const serveStatic = require('serve-static')
const SseStream = require('ssestream')
const app = express()
app.use(serveStatic(__dirname))
app.get('/sse', (req, res) => {
console.log('new connection')
const sseStream = new SseStream(req)
sseStream.pipe(res)
const pusher = setInterval(() => {
sseStream.write({
data: new Date().toTimeString()
})
}, 1000)
res.on('close', () => {
console.log('lost connection')
clearInterval(pusher)
sseStream.unpipe(res)
})
})
app.listen(8080, (err) => {
if (err) throw err
console.log('server ready on http://localhost:8080')
})
//클라이언트
var EventSource = require('eventsource')
var es = new EventSource('http://localhost:8080/sse')
es.onmessage = e => {
console.log(e.data)
}
Wednesday, August 28, 2019
BitcoinSV generate new address javascript
다음과 같이 bsv라이브러리를 설치하자.
> npm i -S bsv
그리고 다음과 같이 network에 맞는 코드를 사용해서 address를 생성하자.
### testnet address 생성
const bsv = require('bsv')const privateKey = bsv.PrivateKey.fromRandom('testnet')
// WIF는 저장해야할 private key의 string이다.
// 콘솔에 출력되는 값을 복사하여 보관하면 된다.
console.log(privateKey.toWIF())
// 마찬가지로 address 문자열을 복사하여 보관하자.
const address = bsv.Address.fromPrivateKey(privateKey, 'testnet')
console.log(address.toString())
### mainnet address 생성
const bsv = require('bsv')const privateKey = bsv.PrivateKey.fromRandom()
// WIF는 저장해야할 private key의 string이다.
// 콘솔에 출력되는 값을 복사하여 보관하면 된다.
console.log(privateKey.toWIF())
// 마찬가지로 address 문자열을 복사하여 보관하자.
const address = bsv.Address.fromPrivateKey(privateKey)
console.log(address.toString())
testnet과 mainnet의 차이는 단순히 fromRandom, fromPrivateKey를 호출할 때 'testnet'이라는 문자열을 추가적으로 전달함으로서 가능하다.
mainnet은 private key가 K, L로 시작되고 testnet은 c로 시작되는 점이 차이점이다.
Wednesday, August 21, 2019
Node.js destructing typescript
const { userId, contentId, amount} = req.body
그러나 우리는 typescript를 사용할 것이므로 userId 등에 각각 정확한 타입을 기입하고 싶을 때는 아래와 같이 하면된다.
const {
userId: string, contentId: string, amount: number
} = req.body
Node.js check top level module environment require.main
if __name__ == "__main__":
다음과 같이 하면 된다.
if (require.main === module) {
}
Wednesday, July 31, 2019
How to make redis client async via bluebird in Node.js
var client = redis.createClient(port, 'ip', {password: 'password'})
var bluebird = require('bluebird')
bluebird.promisifyAll(redis);
async function main2() {
console.log('main')
await client.watchAsync("foo")
const result = await client.getAsync("foo")
console.log(`get ${result}`)
const results = await client.multi().set("foo", "some heavy computation").execAsync()
console.log(`exec ${results}`)
}
main2()





