-
Using Braintree hosted fields with Ruby on Rails
While it is possible to create your own credit card process in a Ruby on Rails app, due to the PCI compliance rules, it is just safer to use something like Stripe or Braintree. …
-
What Operation Code means to me.
A few months back I was on Twitter looking for a place to volunteer to mentor people learning Ruby on Rails. I had not heard of Operation Code until somebody suggested it to me. …
-
Blogging Mondays Premier
Welcome the the very first Operation Code Blogging Mondays event for September 2017. …
-
Not all recruiters are evil
One of the most common topics I see, is about recruiters. Most are complaints about bad ones, and some are compliments of good ones. …
-
Q and A with me
I have recently been searching for a new developer job, and in the process, I have had a few questionnaire’s to fill out. So I thought that I would share them as a way to get to know me better. …
-
Why software startups are like the Marine Corps ….
“Improvise, Adapt, Overcome” is the unofficial motto of the Marine Corps and should be the motto for a software startup if they are to be successful. …
-
Rails - complex rake task
I had to write a pretty complex rake task this evening. I made some seriously big changes to my client app and need to run some processes to update some big changes in the database. …
-
Offshore, nearshore, come ashore - Bringing Rails Team in house
I just made my first year where I work and it has been crazy fun and challenging. …
-
Mongodump cron job for nightly backup
I recently looked for a way to automatically backup Mongodb database nightly. There are some nice bash scripts out there but I wanted to just do it in a cron job. After some struggling with taring the huge db directory I came up with this: 0 0 * * * /bin/bash -l -c 'cd /my_project_path && mongodump --host 0.0.0.0 -d mydb --username mayusername --password mypassword --out /var/dbbackups/backup_$(date +\%Y\%m\%d) && cd /var/dbbackups && tar -zcf backup_$(date +\%Y\%m\%d).tar.gz backup_$(date +\%Y\%m\%d)/mydb The first part is the cron for midnight daily: 0 0 * * * Then it cd's into the rails project directory and gets ready to run bash: /bin/bash -l -c 'cd /my_project_path Then mongodump adding the date on the dump directory: mongodump --host 0.0.0.0 -d mydb --username mayusername --password mypassword --out /var/dbbackups/backup_$(date +\%Y\%m\%d) And finally, cd into that directory and tar (compress) the directory: cd /var/dbbackups && tar -zcf backup_$(date +\%Y\%m\%d).tar.gz backup_$(date +\%Y\%m\%d)/mydb Notice that I added the database name on the directory to tar. Mongodump will create the backup_20150429/mydb directory with all of the .bson files in it. …
-
Improving my developer workflow
From time to time, I look around the web to see what there are for new tools or add-ons to improve my workflow as a developer. Last night I found two really awesome things!!!! I am a big fan of HAML, SASS and trying to get on the CoffeeScript bandwagon ... That being said, I work on legacy applications and find myself converting HTML to HAML and CSS to SASS. There are some great free sites out there they will do these conversions. Then I found Rails Magic Clipboard package for Sublime Text. From their site:
Sublime text plugin to convert CSS, HTML or JavaScript in the clipboard to SASS, CoffeeScript or HAML on your screen
What? Seriously?? This kicks ass. I now can copy a HTML page, change the page to .haml and paste the same code in as HAML code!! Kudos to @nmdowse !! The next thing is just an app for your Mac. One way to improve your workflow is to use shortcuts. Alias's or keyboard shortcuts or whatever. Enter CheatSheet. It is easy to install, now I can just go to one of my applications (like Sublime Text), hold down the CMD key and boom! A popup of the main shortcuts available. No need for 50 different cheat sheets now!! …