There are folders where you can place your script.
For hourly tasks:
/etc/cron.hourly
For daily tasks:
/etc/cron.daily
For weekly tasks:
/etc/cron.weekly
For monthly tasks:
/etc/cron.monthly
May 22
There are folders where you can place your script.
For hourly tasks:
/etc/cron.hourly
For daily tasks:
/etc/cron.daily
For weekly tasks:
/etc/cron.weekly
For monthly tasks:
/etc/cron.monthly
May 19
So, this week, I was approached about doing a project in a language that I have never written in before. I do not have the project yet but I was left wondering how much time to budget to learn the language. A good friend of mine is fond of saying that a coder should be able to write in any language and I do believe that. I also know that I do not know everything, though. I’ve had good experiences previously with koans. This week, I’ll probably download and check out C# Koans.
Useful and/or interesting stuff I found this week:
The effect of positive/negative attitude in system development
IronGate: ColdFusion Exception Manager
Using closures [I just started looking into this]
Georgia Tech / Udacity $7k MS in Computer Science
Send money for free, with gmail
May 12
So, this week, I was asked to write a chunk of PHP code to interact with the PayFlow Pro APIs. It was my first ever chunk of production PHP code. I have to admit, I was not necessarily impressed with PHP. What’s up those weird data masks?
I also used cfthread for the first time (that I can remember). I came across a chunk of ColdFusion that was running as a scheduled task but it heavily leveraging JavaScript. Essentially, it was building a list of tasks and spinning them off using ajax. I didn’t think that would work, so I threw a cfmail into the code to verify that. The cfmail tag never triggered. So, how did I fix the code? Instead using JavaScript to spin off the task, I just included the subtask’s code into a cfthread block. It works well now.
Useful and/or interesting stuff I found this week:
Planet Money is making a T-shirt [kickstarter]
Add “Login using Twitter” to your ColdFusion App
May 11
So, you want to run a web server and you are not the only person who will have the ability to upload files to it? You might want to think about installing an antivirus scanner. If you are running Linux (like I am), Clam AntiVirus is a good option.
So, how do you install it?
sudo apt-get install clamav
How do you update the virus definitions?
sudo freshclam
How do you scan the whole server for viruses?
clamscan -r /
If you want to scan the whole server for viruses and move any infected files, how do you do that?
clamscan -r –move=/home/administrator/quarantine /
So, the next step would be to set this task up in crontab, so it happens automatically, on a regular basis.
May 05
So, this past week, I spent a lot of time working on basic clean-up and security tightening. I was thinking, though about how to improve development of CRUD code.
I read a reddit post a few months ago, that talked about reddit having only two tables per thing. There is a thing table (holding common attributes) and a data table (holding ID, key, and value). I could see this as speeding up development of CRUD code. If all schemas are essentially the same, you would only need minor tweaks from CRUD app to CRUD app. It feels like a little bit of a deal with the devil, though.
I have always liked the thought of bottling up chunks of CRUD and calling them as methods of a crud class. You could have a date-picker method, a file upload method, a record list method, etc. I’m not sure if such a thing exists in the ColdFusion world. One of these days, I might need to pick it up as a task. That, along with use of ORM should make CRUD development reasonably easy and uniform.
Useful and/or interesting stuff I found this week:
Is It Worth the Time? [xkcd]
Microsoft Puts Free Portable WiFi In Forbes Magazine Print Issues
CRAPCHA
“Google’s Self-Driving Car gathers almost 1 GB per SECOND”
Eat This Much [Automated Meal Planner]
Super Mario Bros. Characters Reimagined as Hipsters
Community Supported Agriculture (CSA) in Milwaukee
$50, Starbucks-based application testing
Embed Photo Spheres on Your Website
Ghost: Just a Blogging Platform [kickstarter]
Tool for checking a vehicle’s VIN for free
Apr 28
I am planning on doing something new, here. I am going to start writing a “week in review” post where I talk about something that I worked on over the past week and maybe provide some links and/or photos from the week. This is meant to be 50% brain dump and 50% “I hope this helps someone”.
Early this week, I was given the task of double-checking the output of an international website. The site was written in ColdFusion 8 and I inherited it when I entered the organization. It has a “local site” for a dozen different countries and there is a mechanism for determining which content is visible for which country. I changed this mechanism, with the goal of making it more efficient and maintainable. I believe I succeeded in that, but I was left with the task of making sure that the correct content was still displayed in the correct place. After all, there was a lot of legal disclosures to compare.
At first, I started looking at writing a script that would get each page, trim it, and show me the differences. The problem with that is that tools like Beyond Compare and WinMerge already exist. Why reinvent the wheel? I then started looking at writing a script to just get the versions of the sites so that I could compare them. I quickly remembered (or was reminded) that wget can do that for you.
I wrote a bash script to get all of the local versions of the site and save them to the local disk. I then started doing comparisons. That is when I realized something that stopped me cold. ColdFusion outputs spaces and line breaks in parts of the code that don’t output anything (like cfloop, cfif, etc.). Since I changed the way the content inclusion worked, it moved a lot of those spaces and line breaks.
In the end, I had to go from page to page, manually copying text into Beyond Compare and marking each page as checked. It was a good idea but not all good ideas work out in the end.
Useful and/or interesting stuff I found this week:
Apr 27
I just finished moving this site from a Linode server to a Digital Ocean server. You might be asking, “But Joe, why would you do that?” Simply put, Digital Ocean is cheap and it allowed me to upgrade the specs of my server while cutting the cost in half.
Additionally, I’m going to be working in a few “quick tip” posts that contain simple tips and tricks. They might be short posts but I’m hoping that they will be useful. I would like to get a few posted per week, starting soon.