Dev box
I'm a 32-year-old Ruby on Rails web developer. With the help of friends and co-workers, I've been teaching myself Rails. I worked as a Rails developer for Crowd911 in Colorado. I live in Berlin.
In my developer blog I publish a stochastic array of thoughts and ideas, lessons, mistakes, questions and attempts as answers about Rails and Ruby. I am also posting Anki cards that I used to help myself study. In my view most knowledge is about practice. If you have thoughts, questions, ideas, corrections, arguments, feel free to email me at henryvw@gmail.com.

What is a Good Way to Space Javascript Functions So That You Can See (and Help Others See) Exactly What You Are Trying To Do?

Screen shot 2015 07 02 at 12.24.56 pm

A good way to space out Javascript functions is with brackets at the end of methods and then a long trailing list at the end. See the image.

You can also put empty lines INBETWEEN and inside the function, to help clarify what is going on.

 

Read More
Javascript, Styling of Functions

Javascript Development: Put Styles in CSS, Put Styling 'Actions' in Javascript

Screen shot 2015 07 02 at 12.24.56 pm

Like it says in the title. This is the secret of basic Javascript functions, and how to properly structure them. 

 

Read More
Javascript, CSS

Updated Internet Control / Freedom System

new work-focus system with internet blocks

 

 

 

In June 2015 it's approaching now 1.5 years of work, but I at last have a robust, if complex, system.

Summary of My System
My system can be summarized as follows: I've limited myself to internet access between 1030am and 9:45pm at night. These times have emerged from natural testing over many months. (Times later or earlier than this, I tend to break my system). Note that these times reflect the fact that I have a full time job from roughly 9am or 10am to 6pm or 7pm. If I was working on my own, I might make these times shorter - maybe to between 7:45pm.

I use the following tools:

1. Mac OS X Server - Enables you to launch a server to set up Profile Manager Mobile Config settings

2. Profile Manager

3. System Preferences - Block 

     a. Users & Groups

     b. Profiles

     c. Date and Time

     d. Extensions

4. Power Manager - Automatically turns on Mac computer at night or even when computer is closed so that Self-Control can launch. Without this tool, just using Calendar, you will constantly have openings because the script will only run when the computer is on

5. Self-Control. Scripts are saved in Dropbox

6. Chrome internet blocker. I block a list of all common web url endings, and then a white list of key websites like email, my personal blogs, google, google maps, etc. Also there are a few key google pages to block, like google translate. 

7. Second Chrome internet blocker to block Chrome settings page during that time. Not sure if maybe you could actually just use the same Chrome tool for both. Might be worth testing out. 

7. Safari - delete. There are not satisfactory tools and you only want to be blocking one browser.

Read More
Internet Freedom, Self-Control

Meta Tags - Be Deliberate About Meta Names

Screen shot 2015 06 25 at 11.00.30 am

You need to be deliberate and specific about your Meta Names, because these names are what different browsers, etc. use to recognize and apply your Meta Attributes appropriately.

 

Read More

How can I set up my local machine to broadcast a localhost website to other computers on the network, including iphones on the WIFI network?

Great question!

Port 80 is generally the port where OTHER machines can access local stuff on your machine.

But your Rails typical dev local port is 3000.

So what do you do? 

You can put into terminal: 

   echo "rdr pass inet proto tcp from any to any port 80 -> 127.0.0.1 port 3000" | sudo pfctl -ef -

This will create a redirect for your port 3000 to port 80.

Read More






Footerfull