Tuesday, February 21, 2017

Get the second last child of an element in CSS

In order to query the second last child of a HTML element in CSS, you can just simply use this:

.my-menu:nth-last-child(2)

assuming .my-menu is the class name of the parent node.


Sunday, February 19, 2017

My first time at Vietnam Tech Conference as a presenter

Just like every year, this weekend the school where I'm working hosted a conference name Vietnam Tech Conference (VTC). I was helping the conference by building its website, designing all the materials (badges, banner, ...). This year, I'm a presenter.

I was assigned 2 sessions to be talked in Vietnamese with the intention to expend VTC to local school in Vietnam. So I chose to make one session about Google Apps for Education and how it can help Vietnamese schools and teachers and students to make their teaching and learning better.



The session went very well even though there were only six people in the room and not all of them have technical background (teachers). After I showed them how easy it is to have Google apps for education setup in their school, I offered to consult and help for not-for-profit organizations or public schools in Vietnam for free. Please check out my contact in the presentation below:



At the end of my first session, I was proud to show this quote to people which mean "Learn to change the world" in English:



The second session I made was a Job-alike. Job-alike is where you share your job experience here at the school with other participants from other schools. For some reasons, my sessions turned out to be much more than that, because not only System Administrators like myself attending, but also teachers, librarians. We share ideas about how technologies affect the way teachers teach and how students gain their knowledge. There are pros and cons but we all agreed that without tech, knowledge of the world right now would not be delivered as effective as.



Even though my two sessions had only several people attend, I think I shared what I needed to shared and I'm proud about that. The point I want to made was Schools in Vietnam needs more and more help to make them realize the usefulness of those free tools not only Google ones but also other great technologies that were made free for education. And I'm gonna take actions... Again, contact me if you're a not-for-profit organization or public school in Vietnam.



Wednesday, February 8, 2017

Apple USB to Ethernet adapter not working on my Mac Air

As you've already known, the Apple Macbook Air does not have an Ethernet port so I had to get a USB to Ethernet adapter to plug in my Internet cable. For some reason, when I plugged the adapter in, nothing happens. The folks on the Internet says that it's a bug of Macbook Air and Apple doesn't seem to have any fix for that. Luckily, there's one way to make the adapter works is to create a new network location. By creating a new location, I tell Mac OSX to load all the proper drivers for the network adapters which was missing in the previous locations.


It's good for now.

Saturday, February 4, 2017

Medium to Wordpress migration

Even though the writing and reading experience on the Medium platform is very great,  I had to move my publication to WordPress because Medium's lack of customization. The following steps showing how I did that:

1. Make sure you expose your medium articles to RSS feeds in full text format:

Go to "Homepage and settings" >> Syndication >> Select "Full" >> Click "Save"

2. In your wordpress site, install the WP PIPES plugin, activate it:

https://wordpress.org/plugins/wp-pipes/

3. Then go to the Pipes sidebar menu and set it up:

  • Configuring source (RSSReader, https://your.medium.pulication.url/feed) and destination (post):


  • Mapping fields from feeds and wordpress posts:


4. Click "Test this pipe" and enjoy

Note: I haven't found a way to migrate the images to WordPress, so I have to do it manually for now.


Wednesday, January 18, 2017

Arrange posts by "order" attribute in WordPress

It's just simple as this function:

function my_get_posts( $query ) {

    if ( is_home() && false == $query->query_vars['suppress_filters'] )
                $query->set('orderby', 'menu_order');
                $query->set('order', 'ASC'); 

    return $query;
}

Basically, you need to order the posts by menu_order attribute.