Skip to content

Instantly share code, notes, and snippets.

View fodra's full-sized avatar
🎯
Focusing

Andrew Artajos fodra

🎯
Focusing
  • Australia
View GitHub Profile

I had new work today. Progress was slow but I got there eventually. Tomorrow, I expect to be more productive. I am doing React Native work now coming from web work yesterday. It's a bit of the same but different thing.

Today I had the chance to read another chapter of the book Great Southern Land. Still interesting but not as interesting as the first part of the book.

I had a late lunch. I went out and did my usual walk around the block. Today what a pleasant surprise when I chanced upon my Tita Ellen and Tita Cyn a few steps away from our building. They were ready to have lunch as well and looking for the Chinese restaurant that' been closed for ages.

Today I planned to go home early and run a few rounds in our neighborhood. Guess what? It never happened. Instead, I invited my wife to have dinner at that ramen place because I can't fight it anymore. I had to give in because it's been so long since my last visit there. Tell you what, it was worth it. Shujinko -- the place to eat ramen in Melbourne. If you

@fodra
fodra / 19-02-2019.md
Last active February 19, 2019 05:57
morning routine, goals

Today was smooth sailing for me @ work. Although I was not able to do my morning routine before going to work, I was pretty productive.

What morning routine?

So before going to work, I usually pass by the city library for (1) empty my bladder and (2) some reading. Currently, I'm reading a travel book Great Southern Land. It's a documentary by ABC that was turned into a book. It covers the things how Australia works starting from a bird's eye view. This is a book that really caught my interest. It's not something that I read in a blog post listing "must read books before you die". It's a book filled with breathtaking views of the Australian landscape. There are a lot of interesting features of the land that you might not see when travelling on land. This is not a travel book so the good, the bad, and the ugly is in here too.

This morning was a bit different because there were delays in the morning train. There was a car and train collision in one of the level crossings which caused a 20-minute delay across

@fodra
fodra / 15-02-2019.md
Last active February 19, 2019 21:49
fifth year

Today, it was a slow day at work. I had one ticket to solve and worked on it whole day. Good thing at the end of the day, I managed to create a pull request. Not reviewed though it just sits there building, waiting for reviewers.

After work I managed to run three rounds in my usual route. I started running again last week. First week, I did two rounds. Today I added one more round to that. I find that when I go back to running and I have not ran in a long time -- when I sweat I feel itchy. I'm sure it'll be the same for other people as well.

At the start of the year I did yoga in January, this month I planned to do yoga still and put in jogging in between. So that's three days of yoga and two days of jogging. I find that I can't do both. Something always gives. I noticed I am more inclined to do jogging over yoga. I think it is the general theme if you spread yourself too thin. You end up doing little bits of stuff here and there but not going deep into one. I should really put more focus on the stuff I wan

@fodra
fodra / vim.md
Created September 10, 2018 00:45

Cut

  • command mode in vim yy on the line

Paste P or p to paste it

@fodra
fodra / Setting scroll position with ReactJS
Created August 29, 2018 00:56 — forked from ydeshayes/Setting scroll position with ReactJS
Setting scroll position with ReactJS
// Edit from http://blog.vjeux.com/2013/javascript/scroll-position-with-react.html
componentDidMount() {
const node = ReactDOM.findDOMNode(this);
node.scrollTop = node.scrollHeight;
}
componentWillUpdate: function() {
const node = this.getDOMNode();
this.shouldScrollBottom = node.scrollTop + node.offsetHeight === node.scrollHeight;
},
@fodra
fodra / NPM.md
Last active August 1, 2018 00:18
Notes on npm
  1. Save is implied npm config set save=true

  2. We want the exact version of the dependency npm config set save-exact=true

  3. Add supported node version in package.json

{
 "engines": {
@fodra
fodra / CssDemos.md
Created June 21, 2018 23:15
This is a collection of CSS articles I found very useful.
@fodra
fodra / Python.md
Last active June 20, 2018 07:36
Some useful notes on working with python.
  1. Using ipdb, when in ipdb.set_trace() mode use s command to step into the function.
  1. Simple http server to transfer files from your computer. This will enable users in the same network access the files in your server directory by http://<local_ip>:8000.

python -m http.server 8000

@fodra
fodra / promises_reduce.js
Created June 12, 2018 07:02 — forked from anvk/promises_reduce.js
Sequential execution of Promises using reduce()
function asyncFunc(e) {
return new Promise((resolve, reject) => {
setTimeout(() => resolve(e), e * 1000);
});
}
const arr = [1, 2, 3];
let final = [];
function workMyCollection(arr) {
@fodra
fodra / index.html
Created June 7, 2018 05:52
A MutationObserver example.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>title</title>
</head>
<body>
<div id="target">
<div id="inner">