Since NodeJS works off the Windows’ shell (command prompt) I find myself needing to open the terminal (cmd.exe) more often now. Here are several ways I open the Command Prompt in a specific location within Windows Explorer on Windows 10.
method 1: simply navigate to the desired folder within Windows Explorer and type cmdin the location bar then press enter.
method 2: Navigate to the desired location within Windows Explorer then press (ALT F, M) on your keyboard. This will give you an option to open either an Elevated Command window (ALT F, M, A) or a normal Command window (ALT F, M P).
method 3: hold shift on your keyboard then right click within the desired folder location within Windows Explorer. AN “Open Command window here” context menu will appear.
Now we initialize our project with the following commands
mkdir public – this will be my webroot folder. This will be the destination folders (public/assets/css,
) for the output files nodeJS will generate for us.
mkdir client – this will where my source files will be
npm init – create a package.json file for our project
npm i <module_name> -D – this is how I install the node modules i need. the -D option will put the module in our package.json as a dependency.
once all the the modules I need are installed, I openup my package.json file and write the scripts I will be using to monitor and compile my CSS and JS files. The gist is to output 2 files bundle.js and bundle.css where all dependencies and custom code are concatenated into one file respectively and compressed.
"build-assets":“concurrently–kill-others"npm run build-js""npm run build-css"”,
"watch-assets":“concurrently–kill-others"npm run watch-js""npm run watch-css"”
watch-js – will monitor any changes on my index.js file then automatically compile it.
build-css– will compile all my scss files and compress it into one bundle.css file. I also included a folder where I put my other scss snippet files.
watch-css – this will monitor all .scss files specified in the watch-css command then run build-css once changes are saved on any of the files.
build-assets– will build my js and css files
watch-assets – will monitor my scss and js files and compile them once changes have been made.
Once I have this setup, i simply do npm run-watch-assets while I am developing to automatically compile all my assets on the files while I code. It’s a great time saver and cleans up my code a whole lot, especially since I only have to include 1 .js file and .css file in my html files for all the dependencies and plugins i use..
A lot has been said about the subject, but seldom do I see mutual-respect in the same context.
There has been much debate on the impact of tourism on culture and nature; both the affirmative and negative side raise valid points until declarative ideas turn into imperative statements.
I understand the value of preservation, and I also understand the importance of respect. These communities have been around far longer than most of us living today. I would think it be presumptuous at best to assume to know what is best for them. I abide and observe how they want to go about their business and respect them enough to understand that they have their own way of doing things, barring any reservations I have on whether I find it good and/or bad.
Yes, it is there to be shared, but it also theirs to share… Be it good or bad, that is the price of democracy; you simply can’t have your cake and eat it too. I think the conversation on preservation and progress would go a lot better if most participants exercised mutual respect, and simply did their part without fan-fare.
I used my EON card to make an online transaction amounting to 5,700PHP which was debited from my account even before the card was validated. I got an AVS (Address Verification System) after entering my card details when the amount was deducted from my account. After filing a complaint over the phone, email and to their physical branch, it takes them 5 days to give me a confirmation receipt of my complaint and 15-85 banking days to resolve it.
I am not hung up on the money, but I am irked with the feeling of being conned. As a developer myself, I know how these e-commerce mechanisms work and I am just sorry for myself for trusting this local financial institution… as if I do not have enough bad experiences with other local online institutions.
By the way, this is the third time this has happened. The first 2 were negligible amounts (50 -100PHP) over the Play Store / App Store.which were not worth the stress/effort. I guess third time’s the charm!
Good value for money : you get decent video quality with a 1.8f aperture, GPS, WiFi, an LCD, 16gb MLC microSD card, reusable suction mount and other features you may not even use for 6,000PHP (140USD)
Simplicity : it works out of the box. Just plug it in into your car’s 12 volt socket. It powers up when you start your car and turns off when you shut it down. There is an option to leave it running …at the risk of draining your battery.
Mounting and Interface : It comes with a compact suction mount which is sturdy and reusable. The interface is simple with 4 buttons and an idiot-proof UI to navigate through.
The optional App and software sucks… but it works!
license plates are unreadable in low light conditions without your headlamps turned on.
GPS receiver is weak and takes time to get a signal.
The video quality could be better but at the price they are selling it I can’t complain. It comes with practical features, no bells and whistles and just works out of the box. At the price point it sells at, I can’t complain really.
Here’s a guide which help me setup an AWS (Amazon Web Services) EC2 server for one of my clients. I used to use their free S3 CND service a few years back; though the process has changed a bit since then; so without further flim-flam.
We’ll be needing PuTTY and FileZilla FTP client for this endeavor. Once you’ve got that sorted, login into your AWS console and proceed to the EC2 link under the Service tab. Once there click launch instance, this will launch a wizard which assist you in creating your machine.
Select the Amazon Linux AMI (Amazon Machine Image)
Click on the next steps selecting the defaults until you reach the Security Groups section; once there add the HTTP and HTTPS rules.
After which you will asked to review your settings and prompted to import or add a key pair. Create a new one and save it somewhere safe. Without the key, you will not be able to access the machine, you will not be able to add a new one too.
Download the Key Pair then launch the instance. The instance will take 5-10 minutes to initialize; during that time, process to Network and Security > Elastic IP’s and click Allocate New Address. When the new IP is created, take note of it then right click on the IP and select Associate Address, then select the instance you just made.
When this is done, your machine is not up and running. You can now connect to this virtual machine via PuTTY and Filezilla.
Open Filezilla, on the File menu bar, click on Edit > Settings, then go to SFTP then click Add File. Locate and add the key pair file (.pem) file you downloaded earlier. You will be prompted to convert the .pem file to a .ppk.file, click yes and save that file too.
Now connect via FTP by putting the Elastic IP you created earlier as the host, SFTP as the protocol and ec2-user as the username; this is the default. Leave the password blank. If everything goes well you should be able to connect without any issues.
Now open up PuTTY, use the same IP as the host and connect via SSH. Under Connection > SSH > Auth: Click add file then select the .ppk file created by Filezilla earlier from the original .pem file, then click Open.
Login as the ec2-user and hit enter. If everything worked out, you now have root access to the machine.
From here you can proceed to install and setup the services you need to run a your web server. Below is a quick cheat sheet I used to get mine running.
–update the server
sudo yum update
yum install httpd
service httpd start
yum install php php-mysql
yum install mysql-server
server mysqld start
–setup mysql,leave root password blank asdefault,enter newpassword thenselectYon all questions
I spent the day using UBER as a means of transportation instead of driving, and I am very impressed by the implementation of their system. Finally, a transport system that actually works in the Philippines!
I like how the system is setup to be secure for both the driver and passenger:
You know the name of the UBER account holder and plate number before hand.
A copy of your trip with a map and route is saved on your account for reference.
No need to carry cash or valuables when riding. Your phone is optional after you requested for a ride, since payments are debited to your credit card
The driver does not know your destination before hand.
You get receipts and detailed trip information via your UBER account and email.
Rating based system for both driver and rider serves to be an effective deterrent against unwelcomed behavior.
Yes, the cost is a bit more than traditional taxi cabs, but that’s what you pay for convenience. I’d gladly pay 50 to 100 pesos more if it means that:
I do not need to wait in line for a ride
No more haggling with the driver before and after riding the cab.
have some control over the type of vehicle I ride.
pay for and get a ride for loved-ones or friends …at my expense 🙂
it is still cheaper than driving if you compute the cost of gas and parking fees. Not to mention the physical toll that Manila traffic has on your body when driving.
There are drawbacks to the system like:
having a credit or debit card
having a smart phone
having an internet connection
not regulated by government ...who needs this when the regulating bodies are; to put it lightly… incompetent!
But these requirements are really a non-issue when compared to the benefits you get in return …Beside, majority if not all the people UBER is trying to target already have these.
I’m glad it’s implemented here legally. It is a welcomed transport system that actually works for the people using and providing it. It also provides stiff competition to other transport groups who have become complacent and simply uncompetitive due to their monopoly over certain routes and transport types.
I was pleasantly surprised after restarting my laptop to see a Windows icon on my system tray.
After clicking on it, I was greeted by an app windows stating that I am eligible for a free upgrade to Windows 10 once it is available. I’m currently running Windows 8.1, so I am guessing all Windows 8 users get the free upgrade.
All you have to do is to re click the reservation button on the lower left hand side of the app window. Mine is already gone since I clicked it already… and that’s basically it! Just wait for the update to be downloaded then viola!
This has to be the best workout-partner / mp3 I’ve ever used since I started working out for the past decade… end of review. Kidding aside here’s the gist of what I like and dislike about it in order:
It’s waterproof. You can use it when doing your laps in the pool, it also doubles as ear plugs as the unit acts as a water-tight seal when worn. Just don’t expect to use it for snorkeling though.
compact / no-wires design. This is a big deal for me who runs a lot. No need for straps around your arm or pockets, or running your earphones under your shirt.
good performance. The earphones deliver enough clarity and volume to get you merrily on your way. It also has decent battery life of 8 hours on a full charge and ample storage space at 4GB.
ease of use. You can either use iTunes or Sony’s proprietary music library to manage your songs or you can simply use it as a mass storage USB drive and just sort your songs by folder, which is what I personally do.
You need the cradle to charge / manage your device. Similar to the IPod Shuffle.
cradle / dock issues. The are times that the device doesn’t charge or isn’t recognized due the the pins bending over time. Though I found a DIY solution for it. See the next paragraph below.
no inter-changeable earphones. this isn’t really too bad for me, since decent earphones set you back almost the same as the price of the Walkman NWZ-W273 anyway, so it’s just like buying a new mp3 player all together. But if you’re particular about your earphones/buds then this isn’t for you.
With regards to the cradle / dock issue I mentioned above, it is basically caused by the pins on the dock that connect with the Walkman unit sinking into the dock over time. A simple way to remedy this is to put a spacer between the pins PCB to push them up. I used a folded a piece of post-it, wrapped it in electrical tape and sandwiched it in.
When you encounter that device isn’t recognized, maybe due to some USB fault, you can simply soft-reset the device and you should be good to go. This is by using a paperclip to click the reset button hole found in the left hand side ear bud.
I’ve been running consistently for roughly 8-9 years now, and I have been unemployed for the past 4 months now since I started running. I took this opportunity to go on vacations and take stock of my journey so far:.
You can’t delegate goals. In both running and finances, you can only rely on yourself to make the appropriate choices to achieve your goals. You should not expect institutions, your relatives, peers or your significant other to make them to motivate and make choices for you. At the end of the day, you will be the one to reap the consequences of your choices. Like we say in Filipino
Sila bahala, Ikaw ang kawawa
The buck stops with you. When running, regardless of distance, you can quit anytime you want. The same thing with money and employment, you can rationalize spending, quitting your job anytime. But you only have yourself to blame for it when things go south and depression sets in.
Preparation is key, pack light, you never know where life may take you. “Hope for the best, but prepare for the worst” is a mentality that was engrained in me at an early age. Your preparation influences your decisions and performance in actuality.
Inspiration is fleeting, motivation is lasting. Staying motivated like happiness is a choice. Life is a marathon not a sprint, so make a mental note to stay motivated in anything and everything you apply yourself to.
I have these lessons to thank for landing on my feet albeit being unemployed. Now that I have realized their importance through experience, I can better prepare for uncertainties in the future. I hope it helps you! And with that I live you with this post-appropriate song: