In my previous blog post, I have written about how to use LiveReload Chrome extension, with Guard and some Ruby gems to make a web page automatically reload in a browser, Chrome browser to be specific. Just by reading this sentence, it already sounds like a complicated task. And indeed it is. Luckily, I have found a better solution: BrowserSync.
With LiveReload, you have to install browser extension, but BrowserSync uses Socket.io, so it can supports more than one browser at once. This is great for working with responsive design, where screens with different sizes are needed to be tested.
No need to install extension and support more than one browser are really big plus.
The following is a short instruction and some examples on how to use both BrowserSync and Gulp to automatically reload a web documentation page generated by Docco in any connected browser.
The average page load time is 4.66 seconds. There is one sample coming from China resulted in almost 16 seconds of load time, ouch! That really drags down the average.
Is my blog getting more and more visitors?
Yes! The month-to-month gain is 11.32%, and year-to-year gain is 1,270.49%, more than a thousand fold. Well, I just got started by then.
iMessage is an instant messenger service developed by Apple. It allows users to send free text between Apple devices. But if you leave the Apple ecosystem, then you might find yourself not able to receiving text messages.
Amazon SQS or Simple Queue Service is a fast, reliable, scalable, fully managed message queuing service. There is also AWS CLI or Command Line Interface available to use with the service.
If you have a lot of messages in a queue, this command will show the approximate number:
1
2
3
$ aws sqs get-queue-attributes \
--queue-url $url \
--attribute-names ApproximateNumberOfMessages
Where $url is the URL to the Amazon SQS queue.
There is no command to delete all messages yet, but you can chain a few commands together to make it work:
A single Upstart job can have multiple instances running:
1
2
3
$ sudo start my-job port=4000
$ sudo start my-job port=4001
$ sudo start my-job port=4002
However, when the operating system reboots, the job with multiple instances will fail to start, due to instance information is not provided to the job. We can fix this problem by adding a for loop in the script section:
1
2
3
4
5
6
7
8
9
start on (local-filesystems and net-device-up IFACE!=lo)
stop on shutdown
script
for i in `seq 40004002`
do
exec /path/to/my/job
done
end script
With this Upstart job, we do not need to provide instance information:
1
$ sudo start my-job
Therefore, during system restart, the job will initiate automatically.
GNOME Terminal is a terminal emulation application, installed by default in Ubuntu. GNOME Terminal supports multiple profiles. So, create a few profiles, then execute them one for each tab:
I have created a jq Docker image based on BusyBox with automated builds. BusyBox is really really small in size, so the jq image I have created is also very small, just a little over 6 MB.
I have also created a tag v1.4 in my GitHub repository to match the release of jq binary. This should also be reflected in Docker registry. After couple tries, here is the build details for adding both latest and 1.4 tags:
This is done by starting an automated build with type of tag instead of branch. Everything is done via the Docker Hub website.
If I pull down this repository:
1
$ docker pull realguess/jq
It should give me two image layers with the two different image IDs, which makes sense, as latest commit usually is not the same as the tagged one.
After a while, the index should be built, and I can search it via:
1
2
3
$ docker search jq
NAME DESCRIPTION STARS OFFICIAL AUTOMATED
realguess/jq 1 [OK]
The image is listed as AUTOMATED, but the description is missing here in the search command.
There are two types of descriptions:
Short description
Full description
Full description will be generated automatically via README.md file. I thought the short description can also be generated via README-short.txt, however, this is not the case. You can add it in the settings page for example:
Automated builds are triggered automatically with GitHub and BitBucket repository. Once any commit is pushed to either repository, a trigger will be sent to Docker Hub, and automated build will start.
In Node v0.10.x, the console functions are synchronous when the destination is a terminal or a file (to avoid lost messages in case of premature exit) and asynchronous when it’s a pipe (to avoid blocking for long periods of time). See console. We can test it with the following script:
Stumbled upon Lean Coffee. Lean movement adventures into coffee brewing? No, it is about structured, but agenda-less meeting with participants generated topics, or lean meeting. It is not truly agenda-less, but the topics of the meeting agenda are participant-sourced and participant-judged or voted. So, instead of top-down, but more democratic and bottom-up approach.
“A security group acts as a virtual firewall that controlls the traffic for one or more instances.” 1 The Amazon EC2Security Groups are not just capable controlling traffic from an IP address, but also from all EC2 instances belong to a specific security group. I want to allow an instance belonging to one security group to access an instance belongs to another security group via a custom domain name (subdomain.example.com).
But when I configured the subdomain via Amazon Route 53, I have misconfigured it by assigning a A record, an IP address or the Elastic IP address of the instance. I should have used CNAME, and assigned the public DNS (the public hostname of the EC2 instance).