Skip to content

Instantly share code, notes, and snippets.

View fodra's full-sized avatar
🎯
Focusing

Andrew Artajos fodra

🎯
Focusing
  • Australia
View GitHub Profile
@fodra
fodra / javascript-encoding-types.md
Created November 15, 2017 23:45
This is a list of possible encoding type values for everything node/javascript.

Javascript encoding type values

The character encodings currently supported by Node.js include:

  • 'ascii' - For 7-bit ASCII data only. This encoding is fast and will strip the high bit if set.

  • 'utf8' - Multibyte encoded Unicode characters. Many web pages and other document formats use UTF-8.

  • 'utf16le' - 2 or 4 bytes, little-endian encoded Unicode characters. Surrogate pairs (U+10000 to U+10FFFF) are supported.

@fodra
fodra / electron-packager-extra-resource.md
Created December 18, 2017 06:29
Command to add extra resources in your electron app

This is the example usage of electron-packager that I never found online anywhere else.

To add resource.exe and resource2.dll in the resource folder when you create an installer, this is how you do it with the --extra-resource commandline switch.

--extra-resource

electron-packager . --overwrite --asar --extra-resource="resource1.exe" --extra-resource="resource2.dll" --platform=win32 --arch=ia32 --icon=./frontend/dist/assets/icon.ico --prune=true --out=./build --version-string.ProductName='Hot Pan de sal'

within the backend code you can refer to the files as:

We are on the second half of the year. It's time to set some goals for the remaining half of the year.

On top of my head, I have three major things I want to accomplish. If following the OKR's these would be my objectives.

  1. Stronger and Leaner body.

  2. Increased income.

  3. Funnel money into goals: Home deposit, Japan trip.

Today

Today is mother's day. We celebrated mother's day by having a long breakfast which extended into lunch. We had home cooked baked beans which I prepared the night before. This is the best baked beans I made so far. This is my third time to make the baked beans recipe and I think I nailed it this time. The stuff I did differently:

  • I used one onion instead of two. I minced the onion.
  • I let the onions and garlic soften -- that's 5 to 10 minutes before adding vinegar.
  • When I added vinegar, I let it sit for another 5 minutes.
  • I completely drained the beans of their juices.
  • I did not add extra water to the recipe.

It's been a busy past few weeks since MIA left the building. There were changes to be made and part of that our whole family schedule. It affected all our schedule. Threw me off including my writing, among other things. I gave up my jogging in favour of doing kettlebell sessions at home. It is getting colder outside so I am shifting to indoor workouts.

TV.

I visited a friend's house recently, it occurred to me their TV's picture quality is superb. Well, atleast better than ours. You don't notice these things until you get exposed to someone else's telly. To be honest, I don't care about TVs really but when you see something better and you now know, you can't unsee it. Oh well, I am not planning to upgrade our tv anytime soon. Only when we finally have our own home, we'll upgrade to a better one. But for now, my kids are good. I am happy to be watching in our 32inch screen in the bedroom.

Garden bed

We have to garden beds setup during the start of Autumn. The weather was still hot then when we set it up. A

Create patch

git diff > patch.diff

Apply patch

patch -p1 < patch.diff

sunflower

Today

  • We woke up early for Nanay's flight back home. Then, it's just again. The five of us. It will be hectic once again in our household but we have done this before, and everything will be ok.

  • I worked from home today because we drove nanay to the airport -- dude skipped working today because the kids need support from the big change. It was productive for me in a sense because I did other tasks that needs doing @ work. When I'm in the office I am focused on doing programming tasks. When I'm at home I am more focused on communicating with the team.

  • I ran today because I don't want to pay $5 on Friday. Tomorrow I'll run again to complete my health goals for the week. Funny thing -- this week was not really eating healthy. I bought chocolate cake and a chocolate bar. A while ago I was eating chips. Not good.

Tomorrow

April goals

Family

  • During the start of the week I lagged behind tutoring the kids. But I'll continue doing that on both writing and maths subjects. I love teaching maths over writing.

  • The piano. I'm doing piano lessons with the kids on Saturdays. I could practice the piano on the same days that I run.

  • Dates -- dates with the kids, dates with dude. Can't get enough of oil massages as for the kids and wife.

Saturday

  • Today I woke up early to do my kettlebell exercises. I was hoping it was a kettlebell exercise but instead, I did 30 minutes of yoga. To me, yoga over 15 minutes is like eternity. So after doing 30 minutes, I had enough but there's still 30 minutes worth of yoga video I haven't finished.

  • After the Saturday routine, we went to our piano lessons. I have a bunch of homework to do and this time, I'll make sure I'll do them so I could play earlier. My target is to practice this week so our next lesson, will be more productive and much faster. I am playing on a grand piano. I love playing on a grand piano. Our practice piano is not even a piano -- its a plastic keyboard. This will be my next big project. I'll save up for a better keyboard. It'll be atleast a weighted keyboard with 88 keys. A proper piano for beginners. Once I get more serious at playing, I'd definitely get a grand piano -- just thinking about it makes me smile. There will be a grand piano sitting in our own house. It'll bring us jo

Catchup

Man, the start of April is so busy. Busy but good. Working my way backwards here's the stuff I've done:

Tuesday

  • My 12kg kettlebell arrived at my doorstep. Now, I have three kettlebells an 8kg, 12kg, and a 16kg. I'll be using all of these in my Onnit kettlebell training program.

  • I started doing my first ever Kettlebell training session last night. I can't believe I was just using an 8kg and it is a bit of a challenge already. I used that weight so that I could finish the whole session. Picking a heavier bell would not allow me to finish.